summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2023-07-25 12:38:25 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-07-25 12:38:25 +0000
commit0c1a26adc8ec9d6009dc9062cbe5165f88203d5f (patch)
tree6775ebeccaa097ffa236c993adf38d8cfb572341
parent188eeddd47a61e04639670496924c37866180749 (diff)
downloadastro-0c1a26adc8ec9d6009dc9062cbe5165f88203d5f.tar.gz
astro-0c1a26adc8ec9d6009dc9062cbe5165f88203d5f.tar.zst
astro-0c1a26adc8ec9d6009dc9062cbe5165f88203d5f.zip
[ci] format
-rw-r--r--packages/astro/components/ViewTransitions.astro12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro
index c2f9a7206..69744a026 100644
--- a/packages/astro/components/ViewTransitions.astro
+++ b/packages/astro/components/ViewTransitions.astro
@@ -43,12 +43,14 @@ const { fallback = 'animate' } = Astro.props as Props;
function runScripts() {
let wait = Promise.resolve();
- for(const script of Array.from(document.scripts)) {
+ for (const script of Array.from(document.scripts)) {
const s = document.createElement('script');
s.innerHTML = script.innerHTML;
- for(const attr of script.attributes) {
- if(attr.name === 'src') {
- const p = new Promise(r => {s.onload = r});
+ for (const attr of script.attributes) {
+ if (attr.name === 'src') {
+ const p = new Promise((r) => {
+ s.onload = r;
+ });
wait = wait.then(() => p as any);
}
s.setAttribute(attr.name, attr.value);
@@ -191,6 +193,6 @@ const { fallback = 'animate' } = Astro.props as Props;
{ passive: true, capture: true }
);
});
- addEventListener('load', onload)
+ addEventListener('load', onload);
}
</script>