redux-promise-middleware
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -21,3 +21,4 @@ 'use strict'; | ||
var promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypes; | ||
return function () { | ||
return function (_ref) { | ||
var dispatch = _ref.dispatch; | ||
return function (next) { | ||
@@ -35,7 +36,7 @@ return function (action) { | ||
var _ref = (meta || {}).promiseTypeSuffixes || promiseTypeSuffixes; | ||
var _ref2 = (meta || {}).promiseTypeSuffixes || promiseTypeSuffixes; | ||
var PENDING = _ref[0]; | ||
var FULFILLED = _ref[1]; | ||
var REJECTED = _ref[2]; | ||
var PENDING = _ref2[0]; | ||
var FULFILLED = _ref2[1]; | ||
var REJECTED = _ref2[2]; | ||
@@ -56,7 +57,7 @@ /** | ||
var resolved = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
return next(_extends({ | ||
return dispatch(_extends({ | ||
type: type + '_' + FULFILLED | ||
}, resolved.meta || resolved.payload ? resolved : _extends({}, resolved && { payload: resolved }, meta && { meta: meta }))); | ||
}, function (error) { | ||
return next(_extends({ | ||
return dispatch(_extends({ | ||
type: type + '_' + REJECTED, | ||
@@ -63,0 +64,0 @@ payload: error, |
{ | ||
"name": "redux-promise-middleware", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Redux middleware for handling promises", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19564
458