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] activate hook doesn't receive transition as an argument #19022

Closed
mehulkar opened this issue Jun 20, 2020 · 1 comment · Fixed by #19086
Closed

[Bug] activate hook doesn't receive transition as an argument #19022

mehulkar opened this issue Jun 20, 2020 · 1 comment · Fixed by #19086

Comments

@mehulkar
Copy link
Contributor

mehulkar commented Jun 20, 2020

The activate hook is called by the private enter method:

https://github.com/emberjs/ember.js/blob/v3.20.0-beta.2/packages/@ember/-internals/routing/lib/system/route.ts#L380-L384

which is called by the underlying router.js library

https://github.com/tildeio/router.js/blob/v6.2.5/lib/router/router.ts#L520

Passing along the transition would allow the activate hook to know if the leaf route was activated (i.e. if this.fullRouteName === transition.targetName).

I'm not sure if this is an oversight or not, but it did not seem significant enough to file a feature request / RFC.

@mehulkar mehulkar changed the title [Bug] Bug report [Bug] activate hook doesn't receive transition as an argument Jun 20, 2020
@rwjblue
Copy link
Member

rwjblue commented Jul 30, 2020

Hmm, seems reasonable to me. Not sure exactly why we didn't do that before 🤔.

Wanna send in a pull request? Then I can add it to a future core team meeting agenda to 👍 / 👎

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

Successfully merging a pull request may close this issue.

2 participants