mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
ea547849fd
commit
c3dbd0c1e4
1 file changed
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user