summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2023-02-07 12:51:21 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-02-07 22:01:33 +0000
commit7b38d465210848af75c86c0233723ac991354896 (patch)
tree2aff2b14f062ae701d436a077201ca62109ae4fa /catalog-ui/src/app/models
parent0c54db816bcadb231b007ce56c5c90d7b96d0706 (diff)
Fix unable to reset service inputs
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4376 Change-Id: I6fd85a4da7178e3a18e6fef37c9dae53aec12b81
Diffstat (limited to 'catalog-ui/src/app/models')
-rw-r--r--catalog-ui/src/app/models/properties-inputs/input-fe-model.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts b/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts
index bcdc95c18e..e9a59cb4bd 100644
--- a/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts
+++ b/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts
@@ -143,6 +143,10 @@ export class InputFEModel extends InputBEModel {
}
public resetMetadata = (): void => {
+ if (!this.metadataOrig){
+ return;
+ }
+
this.metadata = _.cloneDeep(this.metadataOrig);
this.metadataIsValid = true;
@@ -160,4 +164,4 @@ export class InputFEModel extends InputBEModel {
return this.hasDefaultValueChanged() || this.hasRequiredChanged() || this.hasMetadataChanged();
}
-} \ No newline at end of file
+}