Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib: refactor to use primordials in internal/priority_queue.js
  • Loading branch information
Lxxyx committed Dec 18, 2020
commit 83eb35d4c6ebf9d96fc5b160030b8fcc5ac15c42
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