util: use primordials.ArrayPrototypeIndexOf instead of mutable method

PR-URL: https://github.com/nodejs/node/pull/48586
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
DaisyDogs07 authored and RafaelGSS committed 2023-08-15 14:33:59 -03:00
1 parent ea547849fd
commit c3dbd0c1e4
1 file changed
+1 -1
+1 -1
View File
@@ -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) {