-
Notifications
You must be signed in to change notification settings - Fork 35
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
Pages via URL #2283
Pages via URL #2283
Conversation
@apinf/developers Ready for review |
core/client/lib/router.js
Outdated
// There are specific cases that this reruns | ||
|
||
// Make sure the roles subscription is ready & FlowRouter hasn't initialized already | ||
if (Roles.subscription.ready() && !FlowRouter._initialized) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a more FlowRouter specific way to wait for the Roles subscription? E.g. an onInitialize
or beforeInitialize
hook?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FlowRouter limits reactive data sources to a single run; when it is first called.
It might not be the case that we can check for the Roles subscription in a different way. I just want to double check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brylie If you can find another way - you're welcome. I added the link to article in description box that I found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After scanning the FlowRouter docs, I can't come up with a different proposal for this code.
One thing that would be helpful, since this is a very unique situation, is to add a multi-line comment describing the need for the Tracker.autorun function. What problem is it solving?
core/client/lib/router.js
Outdated
// There are specific cases that this reruns | ||
|
||
// Make sure the roles subscription is ready & FlowRouter hasn't initialized already | ||
if (Roles.subscription.ready() && !FlowRouter._initialized) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After scanning the FlowRouter docs, I can't come up with a different proposal for this code.
One thing that would be helpful, since this is a very unique situation, is to add a multi-line comment describing the need for the Tracker.autorun function. What problem is it solving?
@brylie Add the comment. Is it full enough? |
Closes #2222
Closes #2281
Meteor.user()._id;
toMeteor.userId()
. It did the stack overflow