1
0
Fork 0
mirror of synced 2024-07-05 06:20:55 +12:00

Fix frontend crashing when adding components to a data provider component with no source

This commit is contained in:
Andrew Kingston 2020-10-08 09:48:03 +01:00
parent d24679bc33
commit ee6c210e67

View file

@ -78,6 +78,11 @@ const contextToBindables = (models, walkResult) => context => {
typeof context.model === "string" ? context.model : context.model.modelId
const model = models.find(model => model._id === modelId)
// Avoid crashing whenever no data source has been selected
if (model == null) {
return []
}
const newBindable = key => ({
type: "context",
instance: context.instance,