clever-frontend-utils
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -115,2 +115,10 @@ "use strict"; | ||
var items = action.payload; | ||
// If items is null or undefined just give them empty data. We need to allow | ||
// null or undefined items for backwards compatibility. | ||
if (items === null || items === undefined) { | ||
return newState; | ||
} | ||
if (!Array.isArray(items)) { | ||
throw new Error("AsyncListReducer received non-array items as input."); | ||
} | ||
for (var i = 0, len = items.length; i < len; i++) { | ||
@@ -117,0 +125,0 @@ var item = items[i]; |
@@ -116,2 +116,13 @@ /** | ||
const items = action.payload; | ||
// If items is null or undefined just give them empty data. We need to allow | ||
// null or undefined items for backwards compatibility. | ||
if (items === null || items === undefined) { | ||
return newState; | ||
} | ||
if (!Array.isArray(items)) { | ||
throw new Error("AsyncListReducer received non-array items as input."); | ||
} | ||
for (let i = 0, len = items.length; i < len; i++) { | ||
@@ -118,0 +129,0 @@ const item = items[i]; |
{ | ||
"name": "clever-frontend-utils", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A set of utils for frontend projects at Clever (and potentially elsewhere!)", | ||
@@ -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
57283
1317