mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
Fixed an "Uncaught ReferenceError" inside of the @astrojs/vue package (#12116)
* fix(vue): initialized the 'app' variable earlier in the client.js script by assigning the 'appInstance' reference to it so that it is available for the later established 'astro:unmount' event listener * Add changeset * fix(vue): reverted the last change and instead moved the 'astro:unmount' event listener to inside of the 'if' statement where the 'app' variable is initialized --------- Co-authored-by: Matt Kane <m@mk.gg>
This commit is contained in:
parent
5bc6223b12
commit
af8401ebf9
2 changed files with 6 additions and 1 deletions
5
.changeset/wicked-sloths-cry.md
Normal file
5
.changeset/wicked-sloths-cry.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@astrojs/vue": patch
|
||||
---
|
||||
|
||||
Fixes an Reference Error that occurred during client transitions
|
|
@ -44,12 +44,12 @@ export default (element) =>
|
|||
await setup(app);
|
||||
app.mount(element, isHydrate);
|
||||
appMap.set(element, appInstance);
|
||||
element.addEventListener('astro:unmount', () => app.unmount(), { once: true });
|
||||
} else {
|
||||
appInstance.props = props;
|
||||
appInstance.slots = slots;
|
||||
appInstance.component.$forceUpdate();
|
||||
}
|
||||
element.addEventListener('astro:unmount', () => app.unmount(), { once: true });
|
||||
};
|
||||
|
||||
function isAsync(fn) {
|
||||
|
|
Loading…
Reference in a new issue