mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix Dummy Structure
actually Dummy-structure was supposed to be so dummy, it would be trivially easy to write a bug-free 20-line code for it. But I failed. To dummy structure...
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
DummyStructure = function (comparator) {
|
||||
var self = this;
|
||||
self.comparator = comparator;
|
||||
self.idMap = new LocalCollection.IdMap;
|
||||
self.idMap = new LocalCollection._IdMap;
|
||||
};
|
||||
|
||||
_.each(['get', 'set', 'remove', 'has', 'empty', 'clear', 'forEach', 'size', 'setDefault'], function (method) {
|
||||
DummyStructure.prototype[method] = function (/* arguments */) {
|
||||
var self = this;
|
||||
return self.idMap[method].apply(self, arguments);
|
||||
return self.idMap[method].apply(self.idMap, arguments);
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user