@cicada/render
Advanced tools
Comparing version 1.1.22-alpha1 to 1.1.22-alpha2
@@ -68,3 +68,3 @@ 'use strict'; | ||
if (_constant.isDebug && _exist2.default.detect(stateTree, statePath) !== true) { | ||
if (_constant.isDebug && statePath !== '' && _exist2.default.detect(stateTree, statePath) !== true) { | ||
var detectArr = _exist2.default.detect(stateTree, statePath); | ||
@@ -340,2 +340,9 @@ // 只检测跳级搜索, 如搜a.b.c,但a.b不存在 | ||
if (inputStatePath === '') { | ||
if (!(0, _util.isObject)(inputState)) throw new Error('root input state must be a object'); | ||
return (0, _util.map)(inputState, function (stateValue, stateName) { | ||
setStateNode(stateName, stateValue, mergeLastState, stateName, stupid); | ||
}); | ||
} | ||
return !get(inputStatePath, {})._id ? setStateNodeFromDescendant(inputStatePath, inputState, mergeLastState, stupid) : setStateNode(inputStatePath, inputState, mergeLastState, inputStatePath, stupid); | ||
@@ -342,0 +349,0 @@ } |
{ | ||
"name": "@cicada/render", | ||
"version": "1.1.22-alpha1", | ||
"version": "1.1.22-alpha2", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
409408
9888