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 ruyadorno committed Sep 16, 2023
1 parent d3041df commit 0a022c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/util/inspect.js
Expand Up @@ -1216,7 +1216,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 0a022c4

Please sign in to comment.