Skip to content

Commit

Permalink
Merge pull request gardener#818 from gardener/bug/create-project
Browse files Browse the repository at this point in the history
[master] Fix: project creation not possible
  • Loading branch information
petersutter authored Oct 1, 2020
2 parents 28a18ca + a32463a commit c938452
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/router/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function errorRoute (context, path) {
}
}

function homeRoute ({ getters }, path) {
function homeRoute ({ getters, dispatch }, path) {
return {
path,
name: 'Home',
Expand All @@ -201,8 +201,14 @@ function homeRoute ({ getters }, path) {
projectScope: false,
breadcrumbs: homeBreadcrumbs
},
beforeEnter (to, from, next) {
async beforeEnter (to, from, next) {
const namespace = getters.defaultNamespace
try {
await dispatch('refreshSubjectRules', namespace) // namespace may also be undefined and will be defaulted
} catch (error) {
console.error('could not refresh subject rules', error.message)
}

if (namespace) {
return next({
name: 'ShootList',
Expand Down

0 comments on commit c938452

Please sign in to comment.