Fixed namespaces not loading when logging in
This commit is contained in:
parent
5f5337b7dd
commit
cc2da96829
1 changed files with 9 additions and 0 deletions
|
@ -57,6 +57,10 @@
|
||||||
this.loadNamespaces()
|
this.loadNamespaces()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
// call the method again if the route changes
|
||||||
|
'$route': 'loadNamespacesIfNeeded'
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
logout() {
|
logout() {
|
||||||
auth.logout()
|
auth.logout()
|
||||||
|
@ -90,6 +94,11 @@
|
||||||
this.handleError(e)
|
this.handleError(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
loadNamespacesIfNeeded(e){
|
||||||
|
if (this.user.authenticated && e.name === 'home') {
|
||||||
|
this.loadNamespaces()
|
||||||
|
}
|
||||||
|
},
|
||||||
handleError(e) {
|
handleError(e) {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
message.error(e, this)
|
message.error(e, this)
|
||||||
|
|
Loading…
Reference in a new issue