Skip to content

Modify the order of beforeEach guards #2292

Closed Answered by Deckluhm
LukMas asked this question in Help and Questions
Discussion options

You must be logged in to vote

There is currently no way to define guards priority other than changing the order in which you declare your guards.

If you can't find a way to reorganize your code, maybe you can try to use beforeEach return value which is a method to unregister the guard. That way you can kind of control the registration order of your guards (by removing and adding them again).

But I truly suggest to see how you can adapt your code to declare guards in the correct order so you don't have to do that.

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@Deckluhm
Comment options

@LukMas
Comment options

@LukMas
Comment options

@Deckluhm
Comment options

Answer selected by LukMas
@LukMas
Comment options

@posva
Comment options

@LukMas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants