From 7d5230e556002b6ddd17c857ad43608590e9a7bd Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 1 Oct 2021 11:55:58 +0200 Subject: [PATCH] feat(warn): improve message for onBeforeRoute*() --- src/navigationGuards.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/navigationGuards.ts b/src/navigationGuards.ts index b8c554ccb..1da420853 100644 --- a/src/navigationGuards.ts +++ b/src/navigationGuards.ts @@ -67,7 +67,7 @@ export function onBeforeRouteLeave(leaveGuard: NavigationGuard) { if (!activeRecord) { __DEV__ && warn( - 'No active route record was found. Are you missing a component?' + 'No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside of a component child of . Maybe you called it inside of App.vue?' ) return } @@ -99,7 +99,7 @@ export function onBeforeRouteUpdate(updateGuard: NavigationGuard) { if (!activeRecord) { __DEV__ && warn( - 'No active route record was found. Are you missing a component?' + 'No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside of a component child of . Maybe you called it inside of App.vue?' ) return }