fix(vue): router guards are now fired correctly when written in a component (#23821)

resolves #23820
This commit is contained in:
Liam DeBeasi
2021-08-26 10:40:48 -04:00
committed by GitHub
parent 50b88b24c2
commit 3c442228ff
3 changed files with 58 additions and 1 deletions

View File

@ -63,7 +63,7 @@ export const IonRouterOutlet = defineComponent({
* page/1 to page/2 would not cause this callback
* to fire since the matchedRouteRef was the same.
*/
watch([route, matchedRouteRef], ([currentRoute, currentMatchedRouteRef], [_, previousMatchedRouteRef]) => {
watch(() => [route, matchedRouteRef.value], ([currentRoute, currentMatchedRouteRef], [_, previousMatchedRouteRef]) => {
/**
* If the matched route ref has changed,
* then we need to set up a new view item.