Fixed namespace loading (#32)

This commit is contained in:
konrad 2019-09-09 17:59:58 +00:00 committed by Gitea
parent d83fb24bbd
commit f6b70bb0a1
1 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@
}
},
created() {
if (auth.user.authenticated && auth.user.infos.type === authTypes.USER && this.$route.params.name === 'home') {
if (auth.user.authenticated && auth.user.infos.type === authTypes.USER && (this.$route.params.name === 'home' || this.namespaces.length === 0)) {
this.loadNamespaces()
}
},
@ -216,7 +216,7 @@
})
},
loadNamespacesIfNeeded(e){
if (auth.user.authenticated && auth.user.infos.type === authTypes.USER && e.name === 'home') {
if (auth.user.authenticated && auth.user.infos.type === authTypes.USER && (e.name === 'home' || this.namespaces.length === 0)) {
this.loadNamespaces()
}
},