From 068664699824b6edbe02455ff24766f839454ce5 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Tue, 14 Jan 2025 15:45:38 -0500 Subject: [PATCH] better key --- packages/astro/src/transitions/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/transitions/router.ts b/packages/astro/src/transitions/router.ts index 4a0e8ce7f072..db266c239059 100644 --- a/packages/astro/src/transitions/router.ts +++ b/packages/astro/src/transitions/router.ts @@ -136,7 +136,7 @@ const scriptsAlreadyRan = new Set(); function runScripts() { let wait = Promise.resolve(); for (const script of document.getElementsByTagName('script')) { - const key = script.src || script.textContent!; + const key = script.src ? new URL(script.src, location.href).href : script.textContent!; if (scriptsAlreadyRan.has(key)) continue; scriptsAlreadyRan.add(key); if (script.dataset.astroExec === '') continue;