Skip to content

Commit

Permalink
fix #38 issue when middleware not return data
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed May 18, 2020
1 parent 000297d commit 492d9e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stateMachine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ const actionTemplate = ({

if (Array.isArray(middleWaresArray) && middleWaresArray.length) {
pipeData = middleWaresArray.reduce(
(currentValue, currentFunction) => currentFunction(currentValue),
(currentValue, currentFunction) =>
currentFunction(currentValue) || currentValue,
pipeData,
);
}
Expand Down

0 comments on commit 492d9e3

Please sign in to comment.