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

beforeRouting being called on method calls #112

Open
svasva opened this issue Jul 14, 2013 · 4 comments
Open

beforeRouting being called on method calls #112

svasva opened this issue Jul 14, 2013 · 4 comments

Comments

@svasva
Copy link

svasva commented Jul 14, 2013

this is a huge issue since it was intended to reset session stuff on a page change, but method calls on the same page making that page to be reset while not navigating away from it :(

@tmeasday
Copy link
Owner

Can you provide a reproduction of this one?

@svasva
Copy link
Author

svasva commented Jul 15, 2013

Disregard this. Was my own fault - just found that using reactive data sources in routing functions is a bad idea :D

@svasva svasva closed this as completed Jul 15, 2013
@svasva svasva reopened this Jul 21, 2013
@svasva
Copy link
Author

svasva commented Jul 21, 2013

I've found out what exactly causes that.
A filter that calls Meteor.user() to check if user was logged in calls beforeRouting each time user record gets a change (in my case users are getting alot of changes in their profile).
I guess we could change it to run beforeRouting after all filters have been passed, just before actually changing a page.
And definitely don't call it if page remains the same.
Any ideas?

@svasva
Copy link
Author

svasva commented Jul 21, 2013

check #117

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

2 participants