Fix errors being thrown when nesting certain components without picking a datasource
This commit is contained in:
parent
53bbbd2b04
commit
f6a388b38a
|
@ -14,7 +14,7 @@
|
|||
let rowId
|
||||
let errors = {}
|
||||
|
||||
$: schema = $store.data && $store.data._table.schema
|
||||
$: schema = $store.data && $store.data._table && $store.data._table.schema
|
||||
$: fields = schema ? Object.keys(schema) : []
|
||||
</script>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
|
||||
onMount(async () => {
|
||||
if (table) {
|
||||
if (table && typeof table === "string") {
|
||||
const tableObj = await fetchTable(table)
|
||||
row.tableId = table
|
||||
row._table = tableObj
|
||||
|
|
Loading…
Reference in New Issue