Fixed namespaces not loading when logging in

This commit is contained in:
kolaente 2018-09-09 16:17:56 +02:00 committed by konrad
parent 5f5337b7dd
commit cc2da96829
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 0 deletions

View File

@ -57,6 +57,10 @@
this.loadNamespaces()
}
},
watch: {
// call the method again if the route changes
'$route': 'loadNamespacesIfNeeded'
},
methods: {
logout() {
auth.logout()
@ -90,6 +94,11 @@
this.handleError(e)
})
},
loadNamespacesIfNeeded(e){
if (this.user.authenticated && e.name === 'home') {
this.loadNamespaces()
}
},
handleError(e) {
this.loading = false
message.error(e, this)