We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd2b188 commit 67da622Copy full SHA for 67da622
src/store.js
@@ -373,14 +373,14 @@ function makeLocalGetters (store, namespace) {
373
function registerMutation (store, type, handler, local) {
374
const entry = store._mutations[type] || (store._mutations[type] = [])
375
entry.push(function wrappedMutationHandler (payload) {
376
- handler(local.state, payload)
+ handler.call(store, local.state, payload)
377
})
378
}
379
380
function registerAction (store, type, handler, local) {
381
const entry = store._actions[type] || (store._actions[type] = [])
382
entry.push(function wrappedActionHandler (payload, cb) {
383
- let res = handler({
+ let res = handler.call(store, {
384
dispatch: local.dispatch,
385
commit: local.commit,
386
getters: local.getters,
0 commit comments