Skip to content
Permalink
Browse files

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>
  • Loading branch information
soar-beep authored and BridgeAR committed Dec 16, 2019
1 parent d09bca9 commit f8aa3655082bd95ce05cb9eb21251b74ff8d0306
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/assert.js
@@ -868,9 +868,9 @@ assert.ifError = function ifError(err) {
tmp2.shift();
// Filter all frames existing in err.stack.
let tmp1 = newErr.stack.split('\n');
for (let i = 0; i < tmp2.length; i++) {
for (const errFrame of tmp2) {
// Find the first occurrence of the frame.
const pos = tmp1.indexOf(tmp2[i]);
const pos = tmp1.indexOf(errFrame);
if (pos !== -1) {
// Only keep new frames.
tmp1 = tmp1.slice(0, pos);

0 comments on commit f8aa365

Please sign in to comment.
You can’t perform that action at this time.