From 94bfdbf764d5b0497a0ee5d3aa09c6078051fa57 Mon Sep 17 00:00:00 2001 From: Eric Schaefer Date: Fri, 17 Aug 2018 19:43:32 +0200 Subject: [PATCH] Add thunk support --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index 4df2006..f7a53b8 100644 --- a/src/index.js +++ b/src/index.js @@ -60,6 +60,7 @@ export default function createStore(state) { let ret = action.apply(this, args); if (ret!=null) { if (ret.then) return ret.then(apply); + if (typeof ret==='function') return ret(apply); return apply(ret); } };