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 rowId
|
||||||
let errors = {}
|
let errors = {}
|
||||||
|
|
||||||
$: schema = $store.data && $store.data._table.schema
|
$: schema = $store.data && $store.data._table && $store.data._table.schema
|
||||||
$: fields = schema ? Object.keys(schema) : []
|
$: fields = schema ? Object.keys(schema) : []
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if (table) {
|
if (table && typeof table === "string") {
|
||||||
const tableObj = await fetchTable(table)
|
const tableObj = await fetchTable(table)
|
||||||
row.tableId = table
|
row.tableId = table
|
||||||
row._table = tableObj
|
row._table = tableObj
|
||||||
|
|
Loading…
Reference in New Issue