We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba29e27 commit 56a8b7dCopy full SHA for 56a8b7d
lib/assert.js
@@ -869,9 +869,9 @@ assert.ifError = function ifError(err) {
869
tmp2.shift();
870
// Filter all frames existing in err.stack.
871
let tmp1 = newErr.stack.split('\n');
872
- for (let i = 0; i < tmp2.length; i++) {
+ for (const errFrame of tmp2) {
873
// Find the first occurrence of the frame.
874
- const pos = tmp1.indexOf(tmp2[i]);
+ const pos = tmp1.indexOf(errFrame);
875
if (pos !== -1) {
876
// Only keep new frames.
877
tmp1 = tmp1.slice(0, pos);
0 commit comments