Skip to content

Commit 094b106

Browse files
DaisyDogs07Ceres6
authored andcommitted
util: use primordials.ArrayPrototypeIndexOf instead of mutable method
PR-URL: nodejs#48586 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 2425f2a commit 094b106

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/util/inspect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ function getFunctionBase(value, constructor, tag) {
12151215
function identicalSequenceRange(a, b) {
12161216
for (let i = 0; i < a.length - 3; i++) {
12171217
// Find the first entry of b that matches the current entry of a.
1218-
const pos = b.indexOf(a[i]);
1218+
const pos = ArrayPrototypeIndexOf(b, a[i]);
12191219
if (pos !== -1) {
12201220
const rest = b.length - pos;
12211221
if (rest > 3) {

0 commit comments

Comments
 (0)