Skip to content

Commit d0ce8ca

Browse files
authored
fix(vue2): handling un-namespaced vuex module (#1442)
1 parent d5e0579 commit d0ce8ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/app-backend-vue2/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ function extractNameFromPath (path: string) {
346346
}
347347

348348
function formatStoreForInspectorState (module, getters, path): CustomInspectorState {
349-
getters = path === 'root' ? getters : getters[path]
349+
getters = !module.namespaced || path === 'root' ? module.context.getters : getters[path]
350350
const gettersKeys = Object.keys(getters)
351351
const storeState: CustomInspectorState = {
352352
state: Object.keys(module.state).map((key) => ({

0 commit comments

Comments
 (0)