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: nodejs#48586
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
DaisyDogs07 authored and Ceres6 committed Aug 14, 2023
1 parent 06a0358 commit cbf32f5
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 cbf32f5

Please sign in to comment.