-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
like this
router.beforeResolve(async to => {
if (to.meta.requiresCamera) {
try {
await askForCameraPermission()
} catch (error) {
if (error instanceof NotAllowedError) {
// ... handle the error and then cancel the navigation
return false
} else {
// unexpected error, cancel the navigation and pass the error to the global handler
throw error
}
}
}
})
RealOFF
Metadata
Metadata
Assignees
Labels
No labels