2FAuth/resources/js_vue3/router/middlewares/noEmptyError.js
2023-11-21 13:45:51 +01:00

7 lines
239 B
JavaScript
Vendored

export default function noEmptyError({ to, 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()
}