Skip to content

Commit fe365b0

Browse files
committed
forward the action
1 parent 3dcb467 commit fe365b0

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
export default ({ dispatch }) => next => action => {};
1+
export default ({ dispatch }) => next => action => {
2+
// Check to see if the action
3+
// has a promise on its 'payload' property
4+
// If it does, then wait for it to resolve
5+
// If it doesn't, then send the action on to the
6+
// next middleware
7+
if (!action.payload || !action.payload.then) {
8+
return next(action);
9+
}
10+
};

0 commit comments

Comments
 (0)