@domql/state
Advanced tools
Comparing version 2.3.145 to 2.3.148
@@ -50,8 +50,9 @@ "use strict"; | ||
const grandChildKey = arr[i + 1]; | ||
const childInParent = parentState[childKey]; | ||
if (childInParent && childInParent[grandChildKey]) { | ||
stateKey = grandChildKey; | ||
parentState = childInParent; | ||
} else | ||
return; | ||
let childInParent = parentState[childKey]; | ||
if (!childInParent) | ||
childInParent = parentState[childKey] = {}; | ||
if (!childInParent[grandChildKey]) | ||
childInParent[grandChildKey] = {}; | ||
stateKey = grandChildKey; | ||
parentState = childInParent; | ||
} | ||
@@ -58,0 +59,0 @@ if (options.returnParent) |
@@ -23,7 +23,9 @@ 'use strict' | ||
const grandChildKey = arr[i + 1] | ||
const childInParent = parentState[childKey] | ||
if (childInParent && childInParent[grandChildKey]) { | ||
stateKey = grandChildKey | ||
parentState = childInParent | ||
} else return | ||
let childInParent = parentState[childKey] | ||
if (!childInParent) childInParent = parentState[childKey] = {} | ||
if (!childInParent[grandChildKey]) childInParent[grandChildKey] = {} | ||
stateKey = grandChildKey | ||
parentState = childInParent | ||
} | ||
@@ -30,0 +32,0 @@ if (options.returnParent) return parentState |
{ | ||
"name": "@domql/state", | ||
"version": "2.3.145", | ||
"version": "2.3.148", | ||
"license": "MIT", | ||
@@ -29,3 +29,3 @@ "type": "module", | ||
}, | ||
"gitHead": "4f0a5e6e5d09df0f83be2aa4ae26dc5a66faa37b" | ||
"gitHead": "de4e989bbd734a02763ba4d4c9279f9fbb060b03" | ||
} |
34953
926