Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed onError issue #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/sub_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ SubsManager.prototype.subscribe = function() {
}
};

SubsManager.prototype._addSub = function(args) {
SubsManager.prototype._addSub = function() {
var self = this;
var args = _.toArray(arguments);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is wrong. We do it already when calling this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function is called on line 22 from subscribe(). Now I see my mistake :-). Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, could you revert this change. So, I can get the _cacheMap issue.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? (Sorry, I'm new to git and github)

var hash = EJSON.stringify(args);
var subName = args[0];
var paramsKey = EJSON.stringify(args.slice(1));
Expand Down Expand Up @@ -199,6 +200,6 @@ SubsManager.prototype.reset = function() {

SubsManager.prototype.clear = function() {
this._cacheList = [];
this._cacheMap = [];
this._cacheMap = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great.

this._reRunSubs();
};
};