@domql/state
Advanced tools
Comparing version 2.3.119 to 2.3.120
@@ -14,3 +14,3 @@ 'use strict' | ||
state = checkForTypes(element) | ||
state = element.state = checkForTypes(element) | ||
@@ -17,0 +17,0 @@ triggerEventOn('stateInit', element) |
@@ -33,3 +33,3 @@ "use strict"; | ||
let { state, __ref: __elementRef } = element; | ||
state = checkForTypes(element); | ||
state = element.state = checkForTypes(element); | ||
(0, import_event.triggerEventOn)("stateInit", element); | ||
@@ -36,0 +36,0 @@ if ((0, import_utils2.checkIfInherits)(element)) { |
@@ -32,4 +32,2 @@ "use strict"; | ||
const element = state.__element; | ||
const parentState = element.parent.state; | ||
state.parent = parentState; | ||
if (!state.__element) | ||
@@ -52,11 +50,11 @@ (0, import_report.report)("ElementOnStateIsNotDefined"); | ||
const applyOverwrite = (state, obj, options) => { | ||
if (!options.skipOverwrite) { | ||
if (options.shallow) { | ||
(0, import_utils.overwriteShallow)(state, obj, import_ignore.IGNORE_STATE_PARAMS); | ||
} else { | ||
(0, import_utils.overwriteDeep)(state, obj, import_ignore.IGNORE_STATE_PARAMS); | ||
} | ||
} else if (options.skipOverwrite === "merge") { | ||
const { skipOverwrite, shallow } = options; | ||
if (skipOverwrite === "merge") { | ||
(0, import_utils.deepMerge)(state, obj, import_ignore.IGNORE_STATE_PARAMS); | ||
return; | ||
} | ||
if (!skipOverwrite) { | ||
const overwriteFunc = shallow ? import_utils.overwriteShallow : import_utils.overwriteDeep; | ||
overwriteFunc(state, obj, import_ignore.IGNORE_STATE_PARAMS); | ||
} | ||
}; | ||
@@ -63,0 +61,0 @@ const hoistStateUpdate = (state, obj, options) => { |
{ | ||
"name": "@domql/state", | ||
"version": "2.3.119", | ||
"version": "2.3.120", | ||
"license": "MIT", | ||
@@ -29,3 +29,3 @@ "type": "module", | ||
}, | ||
"gitHead": "b5b409c827c8b21896d84918f4fe9d133b057916" | ||
"gitHead": "6e932a813b8e6ee0a57a40ebc6dc757cc44e6427" | ||
} |
@@ -12,4 +12,2 @@ 'use strict' | ||
const element = state.__element | ||
const parentState = element.parent.state | ||
state.parent = parentState | ||
@@ -39,11 +37,13 @@ if (!state.__element) report('ElementOnStateIsNotDefined') | ||
const applyOverwrite = (state, obj, options) => { | ||
if (!options.skipOverwrite) { | ||
if (options.shallow) { | ||
overwriteShallow(state, obj, IGNORE_STATE_PARAMS) | ||
} else { | ||
overwriteDeep(state, obj, IGNORE_STATE_PARAMS) | ||
} | ||
} else if (options.skipOverwrite === 'merge') { | ||
const { skipOverwrite, shallow } = options | ||
if (skipOverwrite === 'merge') { | ||
deepMerge(state, obj, IGNORE_STATE_PARAMS) | ||
return | ||
} | ||
if (!skipOverwrite) { | ||
const overwriteFunc = shallow ? overwriteShallow : overwriteDeep | ||
overwriteFunc(state, obj, IGNORE_STATE_PARAMS) | ||
} | ||
} | ||
@@ -50,0 +50,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
28347
756