Skip to content

Commit

Permalink
use getElementsByTagName again
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Oct 11, 2024
1 parent 0e0cb28 commit 6dedef4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function getFallback(): Fallback {

function runScripts() {
let wait = Promise.resolve();
for (const script of document.scripts) {
for (const script of document.getElementsByTagName('script')) {
if (script.dataset.astroExec === '') continue;
const type = script.getAttribute('type');
if (type && type !== 'module' && type !== 'text/javascript') continue;
Expand Down Expand Up @@ -643,7 +643,7 @@ if (inBrowser) {
);
}
}
for (const script of document.scripts) {
for (const script of document.getElementsByTagName('script')) {
script.dataset.astroExec = '';
}
}
Expand Down

0 comments on commit 6dedef4

Please sign in to comment.