|
|
@ -1,4 +1,6 @@ |
|
|
|
export default async function({ app, store, route, redirect }) { |
|
|
|
import _ from 'lodash' |
|
|
|
|
|
|
|
export default _.debounce(async function({ app, store, route, redirect }) { |
|
|
|
try { |
|
|
|
await store.dispatch('projects/setCurrentProject', route.params.id) |
|
|
|
} catch(e) { |
|
|
@ -10,4 +12,4 @@ export default async function({ app, store, route, redirect }) { |
|
|
|
if (!role.is_project_admin && path !== projectRoot) { |
|
|
|
return redirect(projectRoot) |
|
|
|
} |
|
|
|
} |
|
|
|
}, 1000) |