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 0a022c4

Browse filesBrowse files
DaisyDogs07ruyadorno
authored andcommitted
util: use primordials.ArrayPrototypeIndexOf instead of mutable method
PR-URL: #48586 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent d3041df commit 0a022c4
Copy full SHA for 0a022c4

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎lib/internal/util/inspect.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/inspect.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ function getFunctionBase(value, constructor, tag) {
12161216
function identicalSequenceRange(a, b) {
12171217
for (let i = 0; i < a.length - 3; i++) {
12181218
// Find the first entry of b that matches the current entry of a.
1219-
const pos = b.indexOf(a[i]);
1219+
const pos = ArrayPrototypeIndexOf(b, a[i]);
12201220
if (pos !== -1) {
12211221
const rest = b.length - pos;
12221222
if (rest > 3) {

0 commit comments

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