From 751c8fab2603a80919e8d3b4a862f9f6700d1e06 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Wed, 25 Dec 2024 13:32:35 +0100 Subject: [PATCH] Force reload in examples. (#974) After installing the service worker to use the COOP/COEP header, ensure the document is reloaded. Bug:https://github.com/ArthurSonzogni/FTXUI/issues/973 Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/973 --- examples/index.mjs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/index.mjs b/examples/index.mjs index 722b2244..80365904 100644 --- a/examples/index.mjs +++ b/examples/index.mjs @@ -6,9 +6,7 @@ import xterm_addon_fit from 'https://cdn.jsdelivr.net/npm/xterm-addon-fit@0.5. if ("serviceWorker" in navigator && !window.crossOriginIsolated) { const url_sw = new URL("./sw.js", location.href); const registration = await navigator.serviceWorker.register(url_sw); - if (registration.active && !navigator.serviceWorker.controller) { - window.location.reload(); // Reload to ensure the COOP/COEP headers are set. - } + window.location.reload(); // Reload to ensure the COOP/COEP headers are set. } const example_list = "@EXAMPLES@".split(";");