File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export const createMiddleware = ({
6767 responseSuccess = successInterceptor ,
6868 responseFailure = failureInterceptor ,
6969} ) => (
70- ( { getState } ) => next => ( action ) => {
70+ ( { dispatch , getState } ) => next => ( action ) => {
7171 if ( ! action [ CALL_API ] ) {
7272 return next ( action ) ;
7373 }
@@ -90,7 +90,7 @@ export const createMiddleware = ({
9090 const [ requestType , successType , failureType ] = types ;
9191
9292 // dispatch request type
93- next ( actionWith (
93+ dispatch ( actionWith (
9494 requestType , [ apiAction , getState ( ) ]
9595 ) ) ;
9696
@@ -100,10 +100,10 @@ export const createMiddleware = ({
100100
101101 return Promise . all ( promises )
102102 . then (
103- responses => next ( actionWith (
103+ responses => dispatch ( actionWith (
104104 successType , [ apiAction , getState ( ) ] , batchMode ? responses : responses [ 0 ]
105105 ) ) ,
106- error => next ( actionWith (
106+ error => dispatch ( actionWith (
107107 failureType , [ apiAction , getState ( ) ] , error
108108 ) )
109109 ) ;
You can’t perform that action at this time.
0 commit comments