We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c543d66 commit 266695fCopy full SHA for 266695f
src/PriorityQueue/AbstractPriorityQueue.coffee
@@ -3,7 +3,7 @@ module.exports = class AbstractPriorityQueue
3
throw 'Must pass options.strategy, a strategy' if !options?.strategy?
4
throw 'Must pass options.comparator, a comparator' if !options?.comparator?
5
@priv = new options.strategy(options)
6
- @length = @priv.data.length
+ @length = options?.initialValues?.length || 0
7
8
queue: (value) ->
9
@length++
0 commit comments