From b0a156ce17ab969299fe520c2df096a1362ce6e7 Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Mon, 13 May 2024 13:59:57 +0300 Subject: [PATCH] fixed bug --- .../app/ui/dmp/clone-dialog/dmp-clone-dialog.editor.model.ts | 2 +- .../new-version-dialog/dmp-new-version-dialog.editor.model.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/ui/dmp/clone-dialog/dmp-clone-dialog.editor.model.ts b/dmp-frontend/src/app/ui/dmp/clone-dialog/dmp-clone-dialog.editor.model.ts index 801ebe21a..e0aaab836 100644 --- a/dmp-frontend/src/app/ui/dmp/clone-dialog/dmp-clone-dialog.editor.model.ts +++ b/dmp-frontend/src/app/ui/dmp/clone-dialog/dmp-clone-dialog.editor.model.ts @@ -21,7 +21,7 @@ export class DmpCloneDialogEditorModel implements CloneDmpPersist { this.id = item.id; this.label = item.label + " New"; this.description = item.description; - this.descriptions = item.descriptions.map(d=> d.id); + this.descriptions = item.descriptions?.map(d=> d.id); } return this; } diff --git a/dmp-frontend/src/app/ui/dmp/new-version-dialog/dmp-new-version-dialog.editor.model.ts b/dmp-frontend/src/app/ui/dmp/new-version-dialog/dmp-new-version-dialog.editor.model.ts index 5741044f3..fb275c0f1 100644 --- a/dmp-frontend/src/app/ui/dmp/new-version-dialog/dmp-new-version-dialog.editor.model.ts +++ b/dmp-frontend/src/app/ui/dmp/new-version-dialog/dmp-new-version-dialog.editor.model.ts @@ -23,7 +23,7 @@ export class DmpNewVersionDialogEditorModel implements NewVersionDmpPersist { this.id = item.id; this.label = item.label; this.description = item.description; - this.descriptions = item.descriptions.map(d=> d.id); + this.descriptions = item.descriptions?.map(d=> d.id); this.blueprintId = item.blueprint.id; this.hash= item.hash; }