mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01: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:
parent
bfffd44457
commit
f3adc11e37
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user