diff --git a/lib/app/store.js b/lib/app/store.js index f3a5854949..c4f0ae7afc 100644 --- a/lib/app/store.js +++ b/lib/app/store.js @@ -33,10 +33,14 @@ for (let filename of filenames) { } // createStore -export const createStore = storeData === 'function' ? storeData : () => { - return new Vuex.Store(Object.assign({}, storeData, { - state: storeData.state() // Vuex Bug! - })) +export const createStore = storeData instanceof Function ? storeData : () => { + // Vuex Bug + if (storeData.state instanceof Function) { + return new Vuex.Store(Object.assign({}, storeData, { + state: storeData.state() + })) + } + return new Vuex.Store(storeData) } // Dynamically require module