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; }