Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9da5444

Browse filesBrowse 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
Copy full SHA for 9da5444

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎lib/assert.js‎

Copy file name to clipboardExpand all lines: lib/assert.js
+2-2Lines 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
let tmp1 = newErr.stack.split('\n');
834-
for (let i = 0; i < tmp2.length; i++) {
834+
for (const errFrame of tmp2) {
835835
// Find the first occurrence of the frame.
836-
const pos = tmp1.indexOf(tmp2[i]);
836+
const pos = tmp1.indexOf(errFrame);
837837
if (pos !== -1) {
838838
// Only keep new frames.
839839
tmp1 = tmp1.slice(0, pos);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.