@domql/state 2.5.27 → 2.5.29

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.
@@ -92,7 +92,7 @@ const hoistStateUpdate = (state, obj, options) => {
92
92
  const changesValue = (0, import_inherit.createChangesByKey)(stateKey, passedValue);
93
93
  const targetParent = findGrandParentState || parent.state;
94
94
  if (options.replace)
95
- targetParent[stateKey] = value;
95
+ (0, import_utils.overwriteDeep)(targetParent, changesValue || value);
96
96
  targetParent.update(changesValue, {
97
97
  execStateFunction: false,
98
98
  isHoisted: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/state",
3
- "version": "2.5.27",
3
+ "version": "2.5.29",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/esm/index.js",
@@ -31,5 +31,5 @@
31
31
  "@domql/report": "latest",
32
32
  "@domql/utils": "latest"
33
33
  },
34
- "gitHead": "057e4e261ea9c9e6bd8da2fe8c2a4ad724dd26c6"
34
+ "gitHead": "df470e5a96cda567c9d99cc98337eac0136d0890"
35
35
  }
package/updateState.js CHANGED
@@ -80,7 +80,7 @@ const hoistStateUpdate = (state, obj, options) => {
80
80
  const findGrandParentState = getParentStateInKey(stateKey, parent.state)
81
81
  const changesValue = createChangesByKey(stateKey, passedValue)
82
82
  const targetParent = findGrandParentState || parent.state
83
- if (options.replace) targetParent[stateKey] = value
83
+ if (options.replace) overwriteDeep(targetParent, changesValue || value) // check with createChangesByKey
84
84
  targetParent.update(changesValue, {
85
85
  execStateFunction: false,
86
86
  isHoisted: true,