Skip to content

Commit

Permalink
better key
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Jan 14, 2025
1 parent cd80fe6 commit 0686646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const scriptsAlreadyRan = new Set<string>();
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;
Expand Down

0 comments on commit 0686646

Please sign in to comment.