diff --git a/packages/astro/src/runtime/server/astro-island.ts b/packages/astro/src/runtime/server/astro-island.ts index 07ea982d3..2e16a547a 100644 --- a/packages/astro/src/runtime/server/astro-island.ts +++ b/packages/astro/src/runtime/server/astro-island.ts @@ -62,7 +62,7 @@ declare const Astro: { start() { const opts = JSON.parse(this.getAttribute('opts')!) as Record; const directive = this.getAttribute('client') as directiveAstroKeys; - if(Astro[directive] === undefined) { + if (Astro[directive] === undefined) { window.addEventListener(`astro:${directive}`, () => this.start(), { once: true }); return; }