mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
docs: add missing return
statement
This commit is contained in:
parent
4430c664e8
commit
fc7867fb0e
@ -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)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user