Browse Source

Fix crash when schema doesnt exist for a datasource

gh-pages
Andrew Kingston 6 years ago
parent
commit
091054df5d
  1. 2
      packages/builder/src/builderStore/dataBinding.js

2
packages/builder/src/builderStore/dataBinding.js

@ -120,7 +120,7 @@ const getContextBindings = (asset, componentId) => {
tableName = info.table?.name
// 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["_rev"] = { type: "string" }
}

Loading…
Cancel
Save