@meadow/redux-api-middleware
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -50,8 +50,6 @@ 'use strict'; | ||
return promise.then(function (data) { | ||
process.nextTick(function () { | ||
return dispatch({ | ||
type: SUCCESS, | ||
payload: data, | ||
meta: meta | ||
}); | ||
dispatch({ | ||
type: SUCCESS, | ||
payload: data, | ||
meta: meta | ||
}); | ||
@@ -61,9 +59,7 @@ | ||
}, function (err) { | ||
process.nextTick(function () { | ||
return dispatch({ | ||
type: FAILURE, | ||
payload: err, | ||
error: true, | ||
meta: meta | ||
}); | ||
dispatch({ | ||
type: FAILURE, | ||
payload: err, | ||
error: true, | ||
meta: meta | ||
}); | ||
@@ -70,0 +66,0 @@ |
@@ -34,11 +34,11 @@ 'use strict'; | ||
return promise.then(data => { | ||
process.nextTick(() => dispatch({ | ||
dispatch({ | ||
type: SUCCESS, | ||
payload: data, | ||
meta | ||
})); | ||
}); | ||
return data; | ||
}, err => { | ||
process.nextTick(() => dispatch({ | ||
dispatch({ | ||
type: FAILURE, | ||
@@ -48,3 +48,3 @@ payload: err, | ||
meta | ||
})); | ||
}); | ||
@@ -51,0 +51,0 @@ throw err; |
{ | ||
"name": "@meadow/redux-api-middleware", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "API middleware for redux", | ||
@@ -5,0 +5,0 @@ "main": "build/middleware.js", |
6347
96