1
0
Fork 0
mirror of synced 2024-10-02 10:08:09 +13:00

Fix crash when schema doesnt exist for a datasource

This commit is contained in:
Andrew Kingston 2021-02-26 09:55:38 +00:00
parent a0456e86bd
commit 1b5ac74150

View file

@ -120,7 +120,7 @@ const getContextBindings = (asset, componentId) => {
tableName = info.table?.name tableName = info.table?.name
// Add _id and _rev fields for certain types // Add _id and _rev fields for certain types
if (datasource.type === "table" || datasource.type === "link") { if (schema && ["table", "link"].includes(datasource.type)) {
schema["_id"] = { type: "string" } schema["_id"] = { type: "string" }
schema["_rev"] = { type: "string" } schema["_rev"] = { type: "string" }
} }