Fix errors being thrown when nesting certain components without picking a datasource
This commit is contained in:
parent
cf28ba24a3
commit
3efac56f5d
|
@ -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