Skip to content

Commit

Permalink
Changed transform prop check from HOP to typeof, updated version to 0…
Browse files Browse the repository at this point in the history
….2.3
  • Loading branch information
dolsem committed May 6, 2019
1 parent 53a79b7 commit 09e3d7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thunkless",
"version": "0.2.2",
"version": "0.2.3",
"description": "Thunkless middleware for Redux",
"main": "dist/thunkless.cjs.js",
"module": "dist/thunkless.esm.js",
Expand Down
2 changes: 1 addition & 1 deletion src/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const HOP = Object.prototype.hasOwnProperty;

const createMiddleware = (store, next, resolve) => (action) => {
if (!HOP.call(action, 'promise')) {
if (!HOP.call(action, 'transform')) return next(action);
if (typeof action.transform !== 'function') return next(action);
return next(action.transform(action, store.getState()));
}

Expand Down

0 comments on commit 09e3d7d

Please sign in to comment.