aurelia / router

A powerful client-side router.
MIT License
120 stars 115 forks source link

fix: Prevent running CanDeactivatePreviousStep twice in same navigation #616

Closed davismj closed 6 years ago

davismj commented 6 years ago

To handle this, I've added a new parameter to the router called couldDeactivate which is set to true whenever the CanDeactivatePreviousStep completes and is reset on every navigation. If a redirect is returned from the CanActivateNextStep, then this value will be true and it is used to build a special pipeline that skips the CanDeactivatePreviousStep on the next pipeline run.

fixes #45