mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
assert: change utils to use index instead of for...of
PR-URL: https://github.com/nodejs/node/pull/59278 Refs: https://github.com/nodejs/node/blob/main/doc/contributing/primordials.md#unsafe-array-iteration Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
This commit is contained in:
1 parent
8d9ceeaf6a
commit
f7484575ff
1 file changed
+2
-1
@@ -222,7 +222,8 @@ function getErrMessage(message, fn) {
|
||||
}
|
||||
const frames = StringPrototypeSplit(message, '\n');
|
||||
message = ArrayPrototypeShift(frames);
|
||||
for (const frame of frames) {
|
||||
for (let i = 0; i < frames.length; i++) {
|
||||
const frame = frames[i];
|
||||
let pos = 0;
|
||||
while (pos < column && (frame[pos] === ' ' || frame[pos] === '\t')) {
|
||||
pos++;
|
||||
|
||||
Reference in new issue
Block a user