Skip to content

Commit

Permalink
lib: refactor to use primordials in internal/priority_queue.js
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lxxyx authored and targos committed Jun 11, 2021
1 parent c8b2218 commit e6c0877
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/internal/priority_queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const {
Array,
ArrayPrototypeIndexOf,
Symbol,
} = primordials;

Expand Down Expand Up @@ -106,7 +107,7 @@ module.exports = class PriorityQueue {

remove(value) {
const heap = this[kHeap];
const pos = heap.indexOf(value);
const pos = ArrayPrototypeIndexOf(heap, value);
if (pos < 1)
return false;

Expand Down

0 comments on commit e6c0877

Please sign in to comment.