From: Eduardo San Martin Morote Date: Fri, 1 Oct 2021 09:55:58 +0000 (+0200) Subject: feat(warn): improve message for onBeforeRoute*() X-Git-Tag: v4.0.12~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7d5230e556002b6ddd17c857ad43608590e9a7bd;p=thirdparty%2Fvuejs%2Frouter.git feat(warn): improve message for onBeforeRoute*() --- diff --git a/src/navigationGuards.ts b/src/navigationGuards.ts index b8c554cc..1da42085 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 }