@domql/state 2.3.148 → 2.3.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/createState.js +3 -2
- package/dist/cjs/createState.js +3 -4
- package/inherit.js +2 -2
- package/package.json +8 -3
package/createState.js
CHANGED
|
@@ -27,9 +27,10 @@ export const createState = function (element, parent, options) {
|
|
|
27
27
|
|
|
28
28
|
// NOTE: Only true when 'onlyResolveExtends' option is set to true
|
|
29
29
|
if (skipApplyMethods) {
|
|
30
|
-
if (element.parent && element.parent.state)
|
|
30
|
+
if (element.parent && element.parent.state)
|
|
31
31
|
element.state.parent = element.parent.state
|
|
32
|
-
|
|
32
|
+
else
|
|
33
|
+
element.state.parent = {}
|
|
33
34
|
return element.state
|
|
34
35
|
}
|
|
35
36
|
|
package/dist/cjs/createState.js
CHANGED
|
@@ -45,11 +45,10 @@ const createState = function(element, parent, options) {
|
|
|
45
45
|
if (dependentState)
|
|
46
46
|
element.state = dependentState;
|
|
47
47
|
if (skipApplyMethods) {
|
|
48
|
-
if (element.parent && element.parent.state)
|
|
48
|
+
if (element.parent && element.parent.state)
|
|
49
49
|
element.state.parent = element.parent.state;
|
|
50
|
-
|
|
51
|
-
element.state.parent =
|
|
52
|
-
}
|
|
50
|
+
else
|
|
51
|
+
element.state.parent = {};
|
|
53
52
|
return element.state;
|
|
54
53
|
}
|
|
55
54
|
applyMethods(element);
|
package/inherit.js
CHANGED
|
@@ -22,8 +22,8 @@ export const getChildStateInKey = (stateKey, parentState, options = {}) => {
|
|
|
22
22
|
const grandChildKey = arr[i + 1]
|
|
23
23
|
|
|
24
24
|
let childInParent = parentState[childKey]
|
|
25
|
-
if (!childInParent) childInParent = parentState[childKey] = {}
|
|
26
|
-
if (!childInParent[grandChildKey]) childInParent[grandChildKey] = {}
|
|
25
|
+
if (!childInParent) childInParent = parentState[childKey] = {} // check for array
|
|
26
|
+
if (!childInParent[grandChildKey]) childInParent[grandChildKey] = {} // check for array
|
|
27
27
|
|
|
28
28
|
stateKey = grandChildKey
|
|
29
29
|
parentState = childInParent
|
package/package.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/state",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.150",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"unpkg": "dist/iife/index.js",
|
|
8
8
|
"jsdelivr": "dist/iife/index.js",
|
|
9
9
|
"main": "dist/esm/index.js",
|
|
10
|
-
"exports":
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"kalduna": "./index.js",
|
|
13
|
+
"default": "./dist/cjs/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
11
16
|
"source": "index.js",
|
|
12
17
|
"files": [
|
|
13
18
|
"*.js",
|
|
@@ -26,5 +31,5 @@
|
|
|
26
31
|
"@domql/report": "latest",
|
|
27
32
|
"@domql/utils": "latest"
|
|
28
33
|
},
|
|
29
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "368c731d0e9f7225329b235dfa446d41a36a341c"
|
|
30
35
|
}
|