@domql/state 2.3.132 → 2.3.139
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/dist/cjs/updateState.js +2 -2
- package/package.json +2 -2
- package/updateState.js +2 -3
package/dist/cjs/updateState.js
CHANGED
|
@@ -101,7 +101,7 @@ const hoistStateUpdate = (state, obj, options) => {
|
|
|
101
101
|
preventUpdate: options.preventHoistElementUpdate,
|
|
102
102
|
overwrite: !options.replace
|
|
103
103
|
});
|
|
104
|
-
const hasNotUpdated =
|
|
104
|
+
const hasNotUpdated = options.preventUpdate !== true || !options.preventHoistElementUpdate;
|
|
105
105
|
if (!options.preventStateUpdateListener && hasNotUpdated) {
|
|
106
106
|
(0, import_event.triggerEventOnUpdate)("stateUpdated", obj, element, options);
|
|
107
107
|
}
|
|
@@ -117,7 +117,7 @@ const updateDependentState = (state, obj, options) => {
|
|
|
117
117
|
};
|
|
118
118
|
const applyElementUpdate = (state, obj, options) => {
|
|
119
119
|
const element = state.__element;
|
|
120
|
-
if (
|
|
120
|
+
if (options.preventUpdate !== true) {
|
|
121
121
|
element.update({}, {
|
|
122
122
|
...options,
|
|
123
123
|
updateByState: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/state",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.139",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"@domql/report": "latest",
|
|
27
27
|
"@domql/utils": "latest"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "64df1958a7956790eb9afa8fbffa95d48f11fedb"
|
|
30
30
|
}
|
package/updateState.js
CHANGED
|
@@ -32,7 +32,6 @@ export const updateState = function (obj, options = STATE_UPDATE_OPTIONS) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
applyOverwrite(state, obj, options)
|
|
35
|
-
|
|
36
35
|
const updateIsHoisted = hoistStateUpdate(state, obj, options)
|
|
37
36
|
if (updateIsHoisted) return state
|
|
38
37
|
|
|
@@ -90,7 +89,7 @@ const hoistStateUpdate = (state, obj, options) => {
|
|
|
90
89
|
preventUpdate: options.preventHoistElementUpdate,
|
|
91
90
|
overwrite: !options.replace
|
|
92
91
|
})
|
|
93
|
-
const hasNotUpdated =
|
|
92
|
+
const hasNotUpdated = options.preventUpdate !== true || !options.preventHoistElementUpdate
|
|
94
93
|
if (!options.preventStateUpdateListener && hasNotUpdated) {
|
|
95
94
|
triggerEventOnUpdate('stateUpdated', obj, element, options)
|
|
96
95
|
}
|
|
@@ -107,7 +106,7 @@ const updateDependentState = (state, obj, options) => {
|
|
|
107
106
|
|
|
108
107
|
const applyElementUpdate = (state, obj, options) => {
|
|
109
108
|
const element = state.__element
|
|
110
|
-
if (
|
|
109
|
+
if (options.preventUpdate !== true) {
|
|
111
110
|
element.update({}, {
|
|
112
111
|
...options,
|
|
113
112
|
updateByState: true
|