mirror of
https://github.com/withastro/astro.git
synced 2025-02-03 22:29:08 -05:00
Fix-component-undefined-svelte-v5 (#12102)
* - fix: 'component is not defined' error when unmount svelte 5 component * added changeset * Moving unmount listener to where the component is defined. * Update .changeset/eighty-ligers-punch.md Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> --------- Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
This commit is contained in:
parent
55e9cd8855
commit
dcc1e895ab
2 changed files with 6 additions and 2 deletions
5
.changeset/eighty-ligers-punch.md
Normal file
5
.changeset/eighty-ligers-punch.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/svelte': patch
|
||||
---
|
||||
|
||||
Fixes an Reference Error that occurred during client transitions
|
|
@ -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 });
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue