Skip to content

Commit f664d9e

Browse files
author
Guillaume Chau
committed
fix(vuex): don't stringify dynamic module registration payload
1 parent c98770a commit f664d9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/vuex.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function initVuexBackend (hook, bridge, isLegacy) {
8383
options
8484
}, {
8585
registerModule: true
86-
})
86+
}, false)
8787
}
8888

8989
return moduleInfo
@@ -110,7 +110,7 @@ export function initVuexBackend (hook, bridge, isLegacy) {
110110
path
111111
}, {
112112
unregisterModule: true
113-
})
113+
}, false)
114114
}
115115

116116
origUnregisterModule(path)
@@ -137,14 +137,14 @@ export function initVuexBackend (hook, bridge, isLegacy) {
137137
addMutation(type, payload)
138138
})
139139

140-
function addMutation (type, payload, options = {}) {
140+
function addMutation (type, payload, options = {}, stringifyPayload = true) {
141141
const index = mutations.length
142142

143143
const payloadData = stringify(payload)
144144

145145
mutations.push({
146146
type,
147-
payload: payloadData,
147+
payload: stringifyPayload ? payloadData : payload,
148148
index,
149149
handlers: store._mutations[type],
150150
registeredModules: Object.keys(registeredModules),

0 commit comments

Comments
 (0)