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

Bug in the code? #72

Open
elie222 opened this issue Mar 16, 2016 · 0 comments
Open

Bug in the code? #72

elie222 opened this issue Mar 16, 2016 · 0 comments

Comments

@elie222
Copy link

elie222 commented Mar 16, 2016

Hi,

I'm trying to debug an issue I'm having and I just came across the following code:

  SubsManager.prototype.subscribe = function() {
  var self = this;

  if(Meteor.isClient) {
    var args = _.toArray(arguments);
    this._addSub(args);

    return {
      ready: function() {
        self.dep.depend();
        return self._ready; // BUG?
      }
    };
  } else { ... }

I'm confused as to why a subscription is returning self._ready which determines whether all subs in the subsmanager are ready. Apologies if this code is fine and it's just my misunderstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant