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 <[email protected]>
Reviewed-By: Pooja D P <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
Lxxyx authored and danielleadams committed Jan 12, 2021
1 parent b1c6a44 commit ec3e841
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 ec3e841

Please sign in to comment.