cx 24.11.3 → 24.11.4
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/widgets.js
CHANGED
|
@@ -4936,7 +4936,7 @@ function createHotPromiseWindowFactoryWithProps(module, factory) {
|
|
|
4936
4936
|
dismiss == null || dismiss();
|
|
4937
4937
|
var window = Window.create(factory(props)(resolve, reject));
|
|
4938
4938
|
window.overlayWillDismiss = function () {
|
|
4939
|
-
if (!reloading) unsubscribe();
|
|
4939
|
+
if (!reloading && unsubscribe) unsubscribe();
|
|
4940
4940
|
};
|
|
4941
4941
|
dismiss = window.open(store);
|
|
4942
4942
|
}
|
|
@@ -4944,10 +4944,14 @@ function createHotPromiseWindowFactoryWithProps(module, factory) {
|
|
|
4944
4944
|
(_subscriberList = subscriberList) == null
|
|
4945
4945
|
? void 0
|
|
4946
4946
|
: _subscriberList.subscribe(function (updatedFactory) {
|
|
4947
|
-
reloading = true;
|
|
4948
4947
|
factory = updatedFactory;
|
|
4949
|
-
|
|
4950
|
-
|
|
4948
|
+
setTimeout(function () {
|
|
4949
|
+
// timeout is required for proper module initialization
|
|
4950
|
+
// sometimes elements are defined in the lower part of the module and if the function is run immediately, it will fail
|
|
4951
|
+
reloading = true;
|
|
4952
|
+
rerun();
|
|
4953
|
+
reloading = false;
|
|
4954
|
+
}, 10);
|
|
4951
4955
|
});
|
|
4952
4956
|
rerun();
|
|
4953
4957
|
});
|
package/package.json
CHANGED
|
@@ -31,15 +31,19 @@ export function createHotPromiseWindowFactoryWithProps(module, factory) {
|
|
|
31
31
|
dismiss?.();
|
|
32
32
|
let window = Window.create(factory(props)(resolve, reject));
|
|
33
33
|
window.overlayWillDismiss = () => {
|
|
34
|
-
if (!reloading) unsubscribe();
|
|
34
|
+
if (!reloading && unsubscribe) unsubscribe();
|
|
35
35
|
};
|
|
36
36
|
dismiss = window.open(store);
|
|
37
37
|
}
|
|
38
38
|
unsubscribe = subscriberList?.subscribe((updatedFactory) => {
|
|
39
|
-
reloading = true;
|
|
40
39
|
factory = updatedFactory;
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
// timeout is required for proper module initialization
|
|
42
|
+
// sometimes elements are defined in the lower part of the module and if the function is run immediately, it will fail
|
|
43
|
+
reloading = true;
|
|
44
|
+
rerun();
|
|
45
|
+
reloading = false;
|
|
46
|
+
}, 10);
|
|
43
47
|
});
|
|
44
48
|
rerun();
|
|
45
49
|
});
|