We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cc10d5 commit 6909e3eCopy full SHA for 6909e3e
lib/assert.js
@@ -831,9 +831,9 @@ assert.ifError = function ifError(err) {
831
tmp2.shift();
832
// Filter all frames existing in err.stack.
833
let tmp1 = newErr.stack.split('\n');
834
- for (let i = 0; i < tmp2.length; i++) {
+ for (const errFrame of tmp2) {
835
// Find the first occurrence of the frame.
836
- const pos = tmp1.indexOf(tmp2[i]);
+ const pos = tmp1.indexOf(errFrame);
837
if (pos !== -1) {
838
// Only keep new frames.
839
tmp1 = tmp1.slice(0, pos);
0 commit comments