Skip to content

Commit f1f9f77

Browse files
authored
fixup! repl: refactor to avoid unsafe array iteration
1 parent 4fab6a8 commit f1f9f77

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/internal/util/inspect.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,7 @@ function inspect(value, opts) {
310310
ctx.showHidden = opts;
311311
} else if (opts) {
312312
const optKeys = ObjectKeys(opts);
313-
for (let i = 0; i < optKeys.length; ++i) {
314-
const key = optKeys[i];
313+
for (const key of optKeys) {
315314
// TODO(BridgeAR): Find a solution what to do about stylize. Either make
316315
// this function public or add a new API with a similar or better
317316
// functionality.

0 commit comments

Comments
 (0)