From cf28ba24a31d02febaca9c5cee61625dfa349fce Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 14 Oct 2020 09:34:23 +0100 Subject: [PATCH] Fix errors being thrown by grid and table --- packages/standard-components/src/DataGrid/Component.svelte | 2 +- packages/standard-components/src/DataTable.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index 6ec91558e5..a292104bd1 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -44,7 +44,7 @@ } onMount(async () => { - if (datasource != null) { + if (!isEmpty(datasource)) { data = await fetchData(datasource, $store) let schema = {} diff --git a/packages/standard-components/src/DataTable.svelte b/packages/standard-components/src/DataTable.svelte index 80f2b306a2..eabd48c4c6 100644 --- a/packages/standard-components/src/DataTable.svelte +++ b/packages/standard-components/src/DataTable.svelte @@ -12,7 +12,7 @@ export let color export let stripeColor export let borderColor - export let datasource = {} + export let datasource export let _bb let data = []