Added check for config crashing when entity properties are not present (#1394)
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
This commit is contained in:
parent
ea0d873ac8
commit
411c2c24c3
|
|
@ -74,19 +74,20 @@ export const EntityProperties = (props: {
|
|||
"CANVAS_WIDGET" | "ICON_WIDGET" | "SKELETON_WIDGET"
|
||||
> = entity.type;
|
||||
config = entityDefinitions[type];
|
||||
if (config) {
|
||||
if (isFunction(config)) config = config(entity);
|
||||
|
||||
if (isFunction(config)) config = config(entity);
|
||||
|
||||
entityProperties = Object.keys(config)
|
||||
.filter(k => k.indexOf("!") === -1)
|
||||
.map(widgetProperty => {
|
||||
return {
|
||||
propertyName: widgetProperty,
|
||||
entityName: entity.widgetName,
|
||||
value: entity[widgetProperty],
|
||||
step: props.step,
|
||||
};
|
||||
});
|
||||
entityProperties = Object.keys(config)
|
||||
.filter(k => k.indexOf("!") === -1)
|
||||
.map(widgetProperty => {
|
||||
return {
|
||||
propertyName: widgetProperty,
|
||||
entityName: entity.widgetName,
|
||||
value: entity[widgetProperty],
|
||||
step: props.step,
|
||||
};
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user