From e4433ec3325158f53b18a9708ac697aed9ee54a1 Mon Sep 17 00:00:00 2001 From: Junior Oliveira Date: Fri, 17 Feb 2017 18:12:19 -0200 Subject: [PATCH] now middleware supports async actions --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 82674e0..72faee1 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,7 @@ const servicesModule = { middleware: ({ getState, dispatch }) => { const container = createContainer() - return next => action => { + return next => async action => { if (action.type === BOOT) { dispatch({ type: CONTAINER_INIT, @@ -23,7 +23,7 @@ const servicesModule = { getService, } - return next(action(servicesApi)) + return next(await action(servicesApi)) } return next(action)