Fix: Clean error on component navigation

fixes #136

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-10-18 19:14:13 +02:00
parent 3651636a06
commit e3f790e92e
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -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 },