diff --git a/ui/src/permission.js b/ui/src/permission.js index 6db690f6e6a..4380c7660d8 100644 --- a/ui/src/permission.js +++ b/ui/src/permission.js @@ -112,7 +112,11 @@ router.beforeEach((to, from, next) => { } else { next({ path: redirect }) } - const project = vueProps.$localStorage.get(CURRENT_PROJECT) + var project = vueProps.$localStorage.get(CURRENT_PROJECT) + if (project == null) { + project = {} + store.commit('SET_PROJECT', project) + } store.dispatch('ToggleTheme', project.id === undefined ? 'light' : 'dark') }) })