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 <[email protected]>
  • Loading branch information
DaisyDogs07 authored and ruyadorno committed Sep 12, 2023
1 parent 10495ad commit 66fb032
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 @@ -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 66fb032

Please sign in to comment.