From fc7867fb0e074750772bf20d4ac0c4201e3f68ef Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 22 Mar 2023 11:07:02 +0000 Subject: [PATCH] docs: add missing `return` statement --- docs/3.api/3.utils/abort-navigation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/3.api/3.utils/abort-navigation.md b/docs/3.api/3.utils/abort-navigation.md index df51a2097f..9d3f96b0e0 100644 --- a/docs/3.api/3.utils/abort-navigation.md +++ b/docs/3.api/3.utils/abort-navigation.md @@ -49,7 +49,7 @@ export default defineNuxtRouteMiddleware((to, from) => { const auth = useState('auth') if (!user.value.isAuthorized) { - abortNavigation('Insufficient permissions.') + return abortNavigation('Insufficient permissions.') } }) ``` @@ -63,7 +63,7 @@ export default defineNuxtRouteMiddleware((to, from) => { try { /* code that might throw an error */ } catch (err) { - abortNavigation(err) + return abortNavigation(err) } }) ```