Skip to content

avoid to get wrong state with mapState #709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 26, 2017

Conversation

ktsn
Copy link
Member

@ktsn ktsn commented Mar 25, 2017

Fix #708

If the store has a namespaced module X that has a non-namespaced module Y, mapState helper can get a wrong state.

This is because X and Y has the same namespace due to inheritance. Then module X in _modulesNamespaceMap is overwritten by Y.

This PR limits only namespaced === true modules can be registered in _modulesNamespaceMap to avoid this behavior.

@ktsn ktsn requested a review from yyx990803 March 25, 2017 17:37
@yyx990803 yyx990803 merged commit 47cf447 into vuejs:dev Mar 26, 2017
@ktsn ktsn deleted the fix-namespaced-state branch March 27, 2017 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants