diff --git a/lib/sub_manager.js b/lib/sub_manager.js index fcabfc4..1766ea2 100644 --- a/lib/sub_manager.js +++ b/lib/sub_manager.js @@ -39,8 +39,9 @@ SubsManager.prototype.subscribe = function() { } }; -SubsManager.prototype._addSub = function(args) { +SubsManager.prototype._addSub = function() { var self = this; + var args = _.toArray(arguments); var hash = EJSON.stringify(args); var subName = args[0]; var paramsKey = EJSON.stringify(args.slice(1)); @@ -199,6 +200,6 @@ SubsManager.prototype.reset = function() { SubsManager.prototype.clear = function() { this._cacheList = []; - this._cacheMap = []; + this._cacheMap = {}; this._reRunSubs(); -}; \ No newline at end of file +};