Skip to content

Why doesn't MeteorSubs work inside autorun? #31

@timadye

Description

@timadye

MeteorSubs doesn't seem to work when called from inside a Tracker.autorun (trackGameState): instead, it calls the server's publish in an infinite loop.
Fortunately Meteor's native subscribe should do what we went - at least inside the Tracker: it doesn't republish the same subscription, and unsubscribes when the state changes again (ie. we leave the endGame view).

We work round this in history.js#L68, but it would be good to understand what's wrong or else report as a MeteorSubs bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code improvementwon't necessarily enhance the functionality, but will make for better codequestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions