mirror of https://github.com/sveltejs/svelte
Fix current component not being cleared after component update (#4909)
parent
aebc6f4725
commit
a2a58c8d33
@ -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