Fix: Clean error on component navigation
fixes #136 Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
3651636a06
commit
e3f790e92e
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,14 @@ const i18n = new VueI18n({
|
|||
messages,
|
||||
})
|
||||
|
||||
Vue.mixin({
|
||||
beforeRouteLeave(_to, _from, next) {
|
||||
// Before leaving the component, reset the errors the component displayed
|
||||
this.$emit('error', null)
|
||||
next()
|
||||
},
|
||||
})
|
||||
|
||||
new Vue({
|
||||
components: { app },
|
||||
|
||||
|
|
Loading…
Reference in a new issue