You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/onmount-get-current-component/main.svelte

17 lines
254 B

<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}