Skip to content
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

Check existence of module parent in isRegistered (fix #1850) #1851

Merged
merged 2 commits into from
Nov 5, 2020

Conversation

urbnjamesmi1
Copy link

This PR fixes issue #1850 .

If you call store.hasModule() with an array where none of the modules or submodules are registered in the store, an error is thrown instead of returning false:

TypeError: Cannot read property 'hasChild' of undefined
        at ModuleCollection.isRegistered (/node_modules/vuex/dist/vuex.common.js:291:17)
        at Store.hasModule (/node_modules/vuex/dist/vuex.common.js:611:24)

Copy link
Member

@kiaking kiaking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Looking nice 👍

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