From 0cb9312e7562704b14f32464071f34786d55b828 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 24 Feb 2020 14:59:23 +0000 Subject: [PATCH] Datatable - swallow exceptions on desroy --- .../src/Datatable/Datatable.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/materialdesign-components/src/Datatable/Datatable.svelte b/packages/materialdesign-components/src/Datatable/Datatable.svelte index 74ce2ef653..a355e23b46 100644 --- a/packages/materialdesign-components/src/Datatable/Datatable.svelte +++ b/packages/materialdesign-components/src/Datatable/Datatable.svelte @@ -30,7 +30,11 @@ onMount(() => { return () => { - !!instance && instance.destroy() + try { + !!instance && instance.destroy() + } catch(e) { + console.log(e) + } instance = null } })