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