summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/properties-inputs
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/models/properties-inputs')
-rw-r--r--catalog-ui/src/app/models/properties-inputs/property-fe-model.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/catalog-ui/src/app/models/properties-inputs/property-fe-model.ts b/catalog-ui/src/app/models/properties-inputs/property-fe-model.ts
index eb18c4e4f9..49baefd4e0 100644
--- a/catalog-ui/src/app/models/properties-inputs/property-fe-model.ts
+++ b/catalog-ui/src/app/models/properties-inputs/property-fe-model.ts
@@ -46,6 +46,9 @@ export class PropertyFEModel extends PropertyBEModel {
constructor(property: PropertyBEModel){
super(property);
+ if (!property) {
+ return;
+ }
this.value = property.value ? property.value : property.defaultValue;//In FE if a property doesn't have value - display the default value
this.isSimpleType = PROPERTY_DATA.SIMPLE_TYPES.indexOf(this.type) > -1;
this.setNonDeclared();
@@ -290,7 +293,7 @@ export class PropertyFEModel extends PropertyBEModel {
propertyType !== PROPERTY_TYPES.TIMESTAMP &&
propertyType !== PROPERTY_TYPES.JSON &&
PROPERTY_DATA.SCALAR_TYPES.indexOf(<string>propertyType) == -1) {
- return JSON.parse(value); // the value object contains the real value ans not the value as string
+ return JSON.parse(valueObj); // the value object contains the real value ans not the value as string
}
return valueObj;
}