mirror of
https://github.com/Luzifer/ots.git
synced 2025-03-14 21:16:28 -04:00
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
@ -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…
x
Reference in New Issue
Block a user