Open stackoverfloweth opened 1 month ago
@stackoverfloweth is this when navigating from the rejection back to profile? Or just anytime you try and go to profile after hitting a rejection?
@pleek91 an update on this
I traced the issue to getBeforeRouteHooksFromRoutes
, which takes to
and from
and returns all the hooks.
The first time I enter my route with this hook I see a hook in onBeforeRouteEnter
where I'd expect
The second time I enter my route the onBeforeRouteEnter
is empty
This line has a condition isRouteEnter
, that is almost certainly the issue but I don't understand what it's trying to do assert.
I made a branch in our router-preview repo setup to reproduce https://github.com/kitbagjs/router-preview/compare/issue-244-repro?expand=1
I added a
onBeforeRouteEnter
hook to my routeworks totally as expected the first time, if I try navigating to
/profile
without an active user the rejection happens, is handled by sending me to rejection route (doesn't matter if I use built in rejection component or custom). However, if I click a router-link again to go to/profile
it seems to totally bypass thisonBeforeRouteEnter
hook.