@wordpress/redux-routine
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -14,2 +14,3 @@ import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
import castError from './cast-error'; | ||
import { isActionOfType, isAction } from './is-action'; | ||
/** | ||
@@ -29,3 +30,3 @@ * Create a co-routine runtime. | ||
return function (value, next, iterate, yieldNext, yieldError) { | ||
if (_typeof(value) !== 'object' || value.type !== actionType) { | ||
if (!isActionOfType(value, actionType)) { | ||
return false; | ||
@@ -50,3 +51,3 @@ } | ||
var unhandledActionControl = function unhandledActionControl(value, next) { | ||
if (_typeof(value) !== 'object' || !isString(value.type)) { | ||
if (!isAction(value)) { | ||
return false; | ||
@@ -53,0 +54,0 @@ } |
@@ -20,2 +20,4 @@ "use strict"; | ||
var _isAction = require("./is-action"); | ||
/** | ||
@@ -42,3 +44,3 @@ * External dependencies | ||
return function (value, next, iterate, yieldNext, yieldError) { | ||
if ((0, _typeof2.default)(value) !== 'object' || value.type !== actionType) { | ||
if (!(0, _isAction.isActionOfType)(value, actionType)) { | ||
return false; | ||
@@ -63,3 +65,3 @@ } | ||
var unhandledActionControl = function unhandledActionControl(value, next) { | ||
if ((0, _typeof2.default)(value) !== 'object' || !(0, _lodash.isString)(value.type)) { | ||
if (!(0, _isAction.isAction)(value)) { | ||
return false; | ||
@@ -66,0 +68,0 @@ } |
@@ -0,1 +1,7 @@ | ||
## 3.0.1 (Unreleased) | ||
### Bug Fix | ||
- Account for null value in redux-routine createRuntime (introduces `isAction` and `isActionOfType` methods to assist with that). | ||
## 3.0.0 (2018-09-30) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "@wordpress/redux-routine", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Redux middleware for generator coroutines.", | ||
@@ -35,3 +35,3 @@ "author": "The WordPress Contributors", | ||
}, | ||
"gitHead": "0aa5c4340f57a69ab935f9e819d74958aad2e022" | ||
"gitHead": "ce02ee2a1749b9b5564cb8483f6c8f24cf8a3871" | ||
} |
@@ -12,2 +12,3 @@ /** | ||
import castError from './cast-error'; | ||
import { isActionOfType, isAction } from './is-action'; | ||
@@ -24,3 +25,3 @@ /** | ||
const rungenControls = map( controls, ( control, actionType ) => ( value, next, iterate, yieldNext, yieldError ) => { | ||
if ( typeof value !== 'object' || value.type !== actionType ) { | ||
if ( ! isActionOfType( value, actionType ) ) { | ||
return false; | ||
@@ -42,3 +43,3 @@ } | ||
const unhandledActionControl = ( value, next ) => { | ||
if ( typeof value !== 'object' || ! isString( value.type ) ) { | ||
if ( ! isAction( value ) ) { | ||
return false; | ||
@@ -45,0 +46,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
59938
33
630
1