Skip to content

Commit

Permalink
feat(warn): improve message for onBeforeRoute*()
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Oct 1, 2021
1 parent e400c77 commit 7d5230e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/navigationGuards.ts
Expand Up @@ -67,7 +67,7 @@ export function onBeforeRouteLeave(leaveGuard: NavigationGuard) {
if (!activeRecord) {
__DEV__ &&
warn(
'No active route record was found. Are you missing a <router-view> component?'
'No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside of a component child of <router-view>. Maybe you called it inside of App.vue?'
)
return
}
Expand Down Expand Up @@ -99,7 +99,7 @@ export function onBeforeRouteUpdate(updateGuard: NavigationGuard) {
if (!activeRecord) {
__DEV__ &&
warn(
'No active route record was found. Are you missing a <router-view> component?'
'No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside of a component child of <router-view>. Maybe you called it inside of App.vue?'
)
return
}
Expand Down

0 comments on commit 7d5230e

Please sign in to comment.