mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
[store] fix condition where root store is not exporting state
This commit is contained in:
parent
437586d92b
commit
0220be4466
@ -34,13 +34,9 @@ for (let filename of filenames) {
|
|||||||
|
|
||||||
// createStore
|
// createStore
|
||||||
export const createStore = storeData instanceof Function ? storeData : () => {
|
export const createStore = storeData instanceof Function ? storeData : () => {
|
||||||
// Vuex Bug
|
return new Vuex.Store(Object.assign({}, storeData, {
|
||||||
if (storeData.state instanceof Function) {
|
state: storeData.state instanceof Function ? storeData.state() : {}
|
||||||
return new Vuex.Store(Object.assign({}, storeData, {
|
}))
|
||||||
state: storeData.state()
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
return new Vuex.Store(storeData)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dynamically require module
|
// Dynamically require module
|
||||||
|
Loading…
Reference in New Issue
Block a user