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 Jul 15, 2023
1 parent c5b0b89 commit 4a26e2d
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 4a26e2d

Please sign in to comment.