Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: initialize root state as an empty object if state function retur…
…ns no value (#927) * assert state to be an object Just a moment ago had hard time debugging this code: ```js const state = () => {} ... new Vuex.Store({ state, modules, ... }) ``` If state is `undefined` and you use modules, Vuex can't create store. This small change will make it easier to find this error. * fix styling * provide default value for state as a function
- Loading branch information