From 3d8dc88cdbff0666b74bc8d79b200c93074bba45 Mon Sep 17 00:00:00 2001 From: Ondrej Bartas Date: Mon, 9 Nov 2015 21:15:04 +0100 Subject: [PATCH] Pass meta to reducer --- src/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 3f69787..2536f76 100644 --- a/src/index.js +++ b/src/index.js @@ -8,13 +8,14 @@ export default function reduxCombineActions() { return next(action); } - const { types, sequence } = action; + const { types, sequence, meta} = action; const actions = action.payload; const [ PENDING, FULFILLED, REJECTED ] = types; let promise; next({ - type: PENDING + type: PENDING, + ...meta ? { meta } : {} }); if (sequence) { @@ -26,12 +27,14 @@ export default function reduxCombineActions() { return promise.then( payload => next({ payload, - type: FULFILLED + type: FULFILLED, + ...meta ? { meta } : {} }), error => next({ payload: error, error: true, type: REJECTED + ...meta ? { meta } : {} }) ); };