docs: add missing return statement

This commit is contained in:
Daniel Roe 2023-03-22 11:07:02 +00:00
parent 4430c664e8
commit fc7867fb0e

View File

@ -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)
}
})
```