mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix minElementId on MinHeap
This commit is contained in:
@@ -7,3 +7,13 @@ MinHeap = function (comparator, options) {
|
||||
|
||||
Meteor._inherits(MinHeap, MaxHeap);
|
||||
|
||||
_.extend(MinHeap.prototype, {
|
||||
maxElementId: function () {
|
||||
throw new Error("Cannot call maxElementId on MinHeap");
|
||||
},
|
||||
minElementId: function () {
|
||||
var self = this;
|
||||
return MaxHeap.prototype.maxElementId.call(self);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ _.extend(MinMaxHeap.prototype, {
|
||||
},
|
||||
minElementId: function () {
|
||||
var self = this;
|
||||
return self._minHeap.maxElementId();
|
||||
return self._minHeap.minElementId();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user