@ofidj/generator-fidj 1.4.1 → 1.4.2
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.
|
@@ -274,6 +274,16 @@ function startModule() {
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
function render() {
|
|
277
|
+
// Leaving the provider's screen is a hash change, and a hash change does not
|
|
278
|
+
// reload the document: without this the shell kept its interaction state and
|
|
279
|
+
// drew that screen again over an address that no longer named one — the
|
|
280
|
+
// person asked to leave and stayed put.
|
|
281
|
+
if (interactionId && !addressedInteraction()) {
|
|
282
|
+
interactionId = "";
|
|
283
|
+
interactionError = "";
|
|
284
|
+
interaction = null;
|
|
285
|
+
interactionFailed = false;
|
|
286
|
+
}
|
|
277
287
|
// Once the mounted app owns the document the shell cannot draw over it, and
|
|
278
288
|
// its own router will try to match addresses that were never its business.
|
|
279
289
|
// So any address it does not own means starting the document again — checked
|
|
@@ -578,6 +588,11 @@ const refusals: Record<string, string> = {
|
|
|
578
588
|
refused: "That could not be completed. Please try again.",
|
|
579
589
|
};
|
|
580
590
|
|
|
591
|
+
function addressedInteraction() {
|
|
592
|
+
const query = window.location.hash.slice(2).split("?")[1] || "";
|
|
593
|
+
return new URLSearchParams(query).get("interaction") || "";
|
|
594
|
+
}
|
|
595
|
+
|
|
581
596
|
function readInteraction() {
|
|
582
597
|
const query = window.location.hash.slice(2).split("?")[1] || "";
|
|
583
598
|
const parameters = new URLSearchParams(query);
|