From adab4aaf1898fc0b3c6542eae41ce6a1a97b7bcb Mon Sep 17 00:00:00 2001 From: katashin Date: Sun, 10 Nov 2019 22:40:21 +0800 Subject: [PATCH] refactor: remove useless parameter on action handlers (#1640) --- src/store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store.js b/src/store.js index 00caafabc..5dd65a0b9 100644 --- a/src/store.js +++ b/src/store.js @@ -440,7 +440,7 @@ 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, @@ -448,7 +448,7 @@ function registerAction (store, type, handler, local) { state: local.state, rootGetters: store.getters, rootState: store.state - }, payload, cb) + }, payload) if (!isPromise(res)) { res = Promise.resolve(res) }