From c760e9cccff1a0c922df995970f6da2dbb53d978 Mon Sep 17 00:00:00 2001 From: Madhuravas Date: Tue, 17 Oct 2023 15:01:04 +0530 Subject: [PATCH] Added condition for undefined values in update my data Signed-off-by: Madhuravas --- .../updatedemographic/updatedemographic.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts index d08e8850..2ee6ffdc 100644 --- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts +++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts @@ -300,9 +300,11 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy { }else{ this.userInputValues[schema.attributeName] = {}; this.buildJSONData[schema.attributeName] = self.userInfo[schema.attributeName] - self.userInfo[schema.attributeName].forEach(item =>{ - this.userInputValues[schema.attributeName][item.language] = '' - }) + if(this.userInfo[schema.attributeName]){ + self.userInfo[schema.attributeName].forEach(item =>{ + this.userInputValues[schema.attributeName][item.language] = '' + }) + } } } }