Skip to content

Commit

Permalink
util: use primordials.ArrayPrototypeIndexOf instead of mutable method
Browse files Browse the repository at this point in the history
PR-URL: #48586
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
DaisyDogs07 authored and RafaelGSS committed Aug 15, 2023
1 parent ea54784 commit c3dbd0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/util/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ function getFunctionBase(value, constructor, tag) {
function identicalSequenceRange(a, b) {
for (let i = 0; i < a.length - 3; i++) {
// Find the first entry of b that matches the current entry of a.
const pos = b.indexOf(a[i]);
const pos = ArrayPrototypeIndexOf(b, a[i]);
if (pos !== -1) {
const rest = b.length - pos;
if (rest > 3) {
Expand Down

0 comments on commit c3dbd0c

Please sign in to comment.