Skip to content

Commit

Permalink
Adds minor optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlplusb committed Oct 28, 2018
1 parent 786cd22 commit 3ea561e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/easy-peasy.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ export const createStore = (model, options = {}) => {
// Effect Action
const actionName = `@effect.${path.join('.')}`
const action = payload => {
references.dispatch({
type: actionName,
payload,
})
if (devTools) {
references.dispatch({
type: actionName,
payload,
})
}
return value(references.dispatch, payload, {
getState: references.getState,
})
Expand Down

0 comments on commit 3ea561e

Please sign in to comment.