Skip to content

Commit e6c0877

Browse files
Lxxyxtargos
authored andcommitted
lib: refactor to use primordials in internal/priority_queue.js
PR-URL: #36560 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Pooja D P <Pooja.D.P@ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent c8b2218 commit e6c0877

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/internal/priority_queue.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const{
44
Array,
5+
ArrayPrototypeIndexOf,
56
Symbol,
67
}=primordials;
78

@@ -106,7 +107,7 @@ module.exports = class PriorityQueue {
106107

107108
remove(value){
108109
constheap=this[kHeap];
109-
constpos=heap.indexOf(value);
110+
constpos=ArrayPrototypeIndexOf(heap,value);
110111
if(pos<1)
111112
returnfalse;
112113

0 commit comments

Comments
 (0)