Skip to content

Commit 266695f

Browse files
committed
Don't depend on Strategy internals
1 parent c543d66 commit 266695f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PriorityQueue/AbstractPriorityQueue.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = class AbstractPriorityQueue
33
throw 'Must pass options.strategy, a strategy' if !options?.strategy?
44
throw 'Must pass options.comparator, a comparator' if !options?.comparator?
55
@priv = new options.strategy(options)
6-
@length = @priv.data.length
6+
@length = options?.initialValues?.length || 0
77

88
queue: (value) ->
99
@length++

0 commit comments

Comments
 (0)