@esfaenza/extensions 15.2.34 → 15.2.36
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.
|
@@ -1087,6 +1087,7 @@ class AppEmbeddingExtensions {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
1089
|
else if (event?.data?.type == "replace-state") {
|
|
1090
|
+
console.log(`Window message - replace-state -> Url: ${event?.data?.url}`);
|
|
1090
1091
|
this.location.replaceState(event?.data?.url);
|
|
1091
1092
|
}
|
|
1092
1093
|
else if (event?.data?.type == "confirm") {
|
|
@@ -1114,7 +1115,9 @@ class AppEmbeddingExtensions {
|
|
|
1114
1115
|
console.log(`Window message - navigate -> ${event?.data?.url}`);
|
|
1115
1116
|
var newTab = event?.data?.newTab;
|
|
1116
1117
|
var replaceState = event?.data?.replaceState;
|
|
1117
|
-
|
|
1118
|
+
// Controllo se il router sta seguendo la chiamata attuale. Escludo i query params che sono gli unici che possono essere seccati dai replaceState
|
|
1119
|
+
// e che potrebbero fare del casino
|
|
1120
|
+
if (!window.location.href.includes(this.router.url.split("?")[0])) {
|
|
1118
1121
|
console.warn("Doppia chiamata di navigazione, ignoro il secondo evento scoordinato dal router");
|
|
1119
1122
|
return;
|
|
1120
1123
|
}
|