Force exit of Error view if no error is provided

This commit is contained in:
Bubka 2021-11-06 11:34:05 +01:00
parent 0383f07ad7
commit 0f17d93152

View File

@ -47,8 +47,8 @@
},
error: function() {
if( this.err === undefined ) {
return null
if( this.err == null ) {
return false
}
else
{
@ -66,7 +66,7 @@
},
props: ['err'], // error.response
props: ['err'], // on object (error.response) or a string
components: {
Modal
@ -78,7 +78,18 @@
this.$router.push({name: 'accounts' });
});
}
},
beforeRouteEnter (to, from, next) {
next(vm => {
if( !vm.err ) {
next({ name: 'accounts' });
}
});
next();
},
}
</script>