summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2023-08-11 12:59:13 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-08-11 12:59:13 +0000
commit2bdcba2aa7cf01475508e0bb1499c73bb088a69a (patch)
treeaf46071109cf284f202f4487e0a02e5d8e0d237f
parent405913cdf20b26407aa351c090f0a0859a4e6f54 (diff)
downloadastro-2bdcba2aa7cf01475508e0bb1499c73bb088a69a.tar.gz
astro-2bdcba2aa7cf01475508e0bb1499c73bb088a69a.tar.zst
astro-2bdcba2aa7cf01475508e0bb1499c73bb088a69a.zip
[ci] format
-rw-r--r--packages/astro/components/ViewTransitions.astro11
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro
index 215cb5b38..efda3b575 100644
--- a/packages/astro/components/ViewTransitions.astro
+++ b/packages/astro/components/ViewTransitions.astro
@@ -72,7 +72,7 @@ const { fallback = 'animate' } = Astro.props as Props;
function runScripts() {
let wait = Promise.resolve();
for (const script of Array.from(document.scripts)) {
- if(script.dataset.astroExec === '') continue;
+ if (script.dataset.astroExec === '') continue;
const s = document.createElement('script');
s.innerHTML = script.innerHTML;
for (const attr of script.attributes) {
@@ -108,14 +108,15 @@ const { fallback = 'animate' } = Astro.props as Props;
const href = el.getAttribute('href');
return doc.head.querySelector(`link[rel=stylesheet][href="${href}"]`);
}
- if(el.tagName === 'SCRIPT') {
+ if (el.tagName === 'SCRIPT') {
let s1 = el as HTMLScriptElement;
- for(const s2 of doc.scripts) {
- if(
+ for (const s2 of doc.scripts) {
+ if (
// Inline
(s1.textContent && s1.textContent === s2.textContent) ||
// External
- (s1.type === s2.type && s1.src === s2.src)) {
+ (s1.type === s2.type && s1.src === s2.src)
+ ) {
return s2;
}
}