ui: Try to handle uncatched error

This commit is contained in:
nemunaire 2022-11-27 12:09:18 +01:00
parent c5d12b9e9f
commit fcd4488bff

View File

@ -13,6 +13,14 @@
import Logo from '$lib/components/Logo.svelte';
import Toaster from '$lib/components/Toaster.svelte';
import VoxPeople from '$lib/components/VoxPeople.svelte';
import { toasts } from '$lib/stores/toasts';
window.onunhandledrejection = (e) => {
toasts.addErrorToast({
message: e.reason,
timeout: 7500,
})
}
</script>
<svelte:head>