mirror of https://github.com/sveltejs/svelte
Fix current component not being cleared after component update (#4909)
parent
ae971f80ae
commit
211fc92e69
@ -0,0 +1,4 @@
|
||||
export default {
|
||||
skip_if_ssr: true,
|
||||
html: `1`,
|
||||
};
|
@ -0,0 +1,16 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { get_current_component } from 'svelte/internal';
|
||||
|
||||
let gotException = 0;
|
||||
|
||||
onMount(() => {
|
||||
try {
|
||||
get_current_component();
|
||||
} catch (error) {
|
||||
gotException++;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{gotException}
|
Loading…
Reference in new issue