mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-09 21:57:47 +02:00
Set up a global notification handler & Error view & Modal component
This commit is contained in:
8
resources/js_vue3/router/middlewares/noEmptyError.js
vendored
Normal file
8
resources/js_vue3/router/middlewares/noEmptyError.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
export default function noEmptyError({ to, next }) {
|
||||
next()
|
||||
if (to.params.err == undefined) {
|
||||
// return to home if no err object is provided to prevent an empty error message
|
||||
next({ name: 'accounts' });
|
||||
}
|
||||
else next()
|
||||
}
|
Reference in New Issue
Block a user