Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "fun-model", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "fun-model is pure functional implementation of FLUX architecture.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -20,3 +20,3 @@ import * as h from './helpers'; | ||
let prop = innerState[subPath]; | ||
return Array.isArray(prop) | ||
return Array.isArray(prop) && path.length > 0 | ||
? getInnerState(prop[Number(path.shift())], path) | ||
@@ -38,3 +38,3 @@ : getInnerState(prop, path); | ||
let newSubState = null; | ||
if (Array.isArray(prop)) { | ||
if (Array.isArray(prop) && path.length > 0) { | ||
let index = Number(path.shift()); | ||
@@ -41,0 +41,0 @@ prop[index] = setInnerState(prop[index], path); |
@@ -35,3 +35,3 @@ import * as h from './helpers'; | ||
let prop = innerState[subPath]; | ||
return Array.isArray(prop) | ||
return Array.isArray(prop) && path.length > 0 | ||
? getInnerState(prop[Number(path.shift())], path) | ||
@@ -54,3 +54,3 @@ : getInnerState(prop, path); | ||
let newSubState = null; | ||
if (Array.isArray(prop)) { | ||
if (Array.isArray(prop) && path.length > 0) { | ||
let index = Number(path.shift()); | ||
@@ -57,0 +57,0 @@ prop[index] = setInnerState(prop[index], path); |
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
171775