mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-18 09:29:46 +02:00
Fix Error view not being displayed while an error exists
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
export default function noEmptyError({ to, next, nextMiddleware }) {
|
||||
if (to.params.err == undefined) {
|
||||
// return to home if no err object is provided to prevent an empty error message
|
||||
export default function noEmptyError({ to, next, nextMiddleware, stores }) {
|
||||
const { notify } = stores
|
||||
|
||||
if (notify.err == null) {
|
||||
// return to home if no err object is set to prevent an empty error message
|
||||
next({ name: 'accounts' });
|
||||
}
|
||||
else nextMiddleware()
|
||||
|
Reference in New Issue
Block a user