From cc2da96829487b9196193799a8747a7fef815360 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 9 Sep 2018 16:17:56 +0200 Subject: [PATCH] Fixed namespaces not loading when logging in --- src/App.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/App.vue b/src/App.vue index 48499ce0..49e41eec 100644 --- a/src/App.vue +++ b/src/App.vue @@ -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)