Skip to content

Commit

Permalink
refactor: remove useless parameter on action handlers (#1640)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsn authored Nov 10, 2019
1 parent 538ee58 commit adab4aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,15 +440,15 @@ function registerMutation (store, type, handler, local) {

function registerAction (store, type, handler, local) {
const entry = store._actions[type] || (store._actions[type] = [])
entry.push(function wrappedActionHandler (payload, cb) {
entry.push(function wrappedActionHandler (payload) {
let res = handler.call(store, {
dispatch: local.dispatch,
commit: local.commit,
getters: local.getters,
state: local.state,
rootGetters: store.getters,
rootState: store.state
}, payload, cb)
}, payload)
if (!isPromise(res)) {
res = Promise.resolve(res)
}
Expand Down

0 comments on commit adab4aa

Please sign in to comment.