diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js index 2ce564b7a..7a353c828 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js @@ -13,10 +13,14 @@ import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods'; const debug = process.env.NODE_ENV !== 'production'; const id = window.accompanyingCourseId; -let scopesPromise = fetchScopes(); +let getScopesPromise = (root) => { + if (root === 'app') { + return fetchScopes(); + } +} let accompanyingCoursePromise = getAccompanyingCourse(id); -let initPromise = (root) => Promise.all([scopesPromise, accompanyingCoursePromise]) +let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCoursePromise]) .then(([scopes, accompanyingCourse]) => new Promise((resolve, reject) => { const store = createStore({