summaryrefslogtreecommitdiff
path: root/packages/integrations/svelte/client-v5.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packages/integrations/svelte/client-v5.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/integrations/svelte/client-v5.js b/packages/integrations/svelte/client-v5.js
index 78bab3ea3..7a046b5bf 100644
--- a/packages/integrations/svelte/client-v5.js
+++ b/packages/integrations/svelte/client-v5.js
@@ -39,8 +39,7 @@ export default (element) => {
},
});
existingApplications.set(element, component);
+ element.addEventListener('astro:unmount', () => unmount(component), { once: true });
}
-
- element.addEventListener('astro:unmount', () => unmount(component), { once: true });
};
};