vuejs / vuex

🗃️ Centralized State Management for Vue.js.
https://vuex.vuejs.org
MIT License
28.42k stars 9.58k forks source link

Incorrect hasModule function behavior for nested paths #2164

Open egorbabintcev opened 2 years ago

egorbabintcev commented 2 years ago

Version

3.6.2

Reproduction link

codesandbox.io

Steps to reproduce

You just have to call Store.hasModule function with non-existed nested path, deeper or equal to 3 levels (e.g. Store.hasModule(['unexistable', 'module', 'path'])

What is expected?

Correct boolean result for calling with non-existed 3 or deeper level path

What is actually happening?

Error in internal module method