Skip to content

Commit

Permalink
chore: add clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Aug 29, 2023
1 parent c0b75be commit b0a3573
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/astro/src/runtime/server/astro-island.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ declare const Astro: {
static observedAttributes = ['props'];
disconnectedCallback() {
document.addEventListener('astro:after-swap', () => {
// If element wasn't persisted, fire unmount event
if (!this.isConnected) this.dispatchEvent(new CustomEvent('astro:unmount'))
}, { once: true })
}
Expand Down

0 comments on commit b0a3573

Please sign in to comment.