Skip to content

Commit 9da5444

Browse files
soar-beeptargos
authored andcommitted
assert: use for...of
Refs: #30960 PR-URL: #30983 Refs: #30960 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 49a9b31 commit 9da5444

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/assert.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,9 +831,9 @@ assert.ifError = function ifError(err) {
831831
tmp2.shift();
832832
// Filter all frames existing in err.stack.
833833
lettmp1=newErr.stack.split('\n');
834-
for(leti=0;i<tmp2.length;i++){
834+
for(consterrFrameoftmp2){
835835
// Find the first occurrence of the frame.
836-
constpos=tmp1.indexOf(tmp2[i]);
836+
constpos=tmp1.indexOf(errFrame);
837837
if(pos!==-1){
838838
// Only keep new frames.
839839
tmp1=tmp1.slice(0,pos);

0 commit comments

Comments
 (0)