From 3c0a76c4d5594140e3e864c5607feadaa9d89d7b Mon Sep 17 00:00:00 2001 From: Guiheux Steven Date: Fri, 25 Mar 2022 10:59:39 +0100 Subject: [PATCH] fix(ui): allow to edit notifications without pipelines (#6111) --- .../form/workflow.notification.form.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/src/app/views/workflow/show/notification/form/workflow.notification.form.component.ts b/ui/src/app/views/workflow/show/notification/form/workflow.notification.form.component.ts index 9005d43c0e..d292154d75 100644 --- a/ui/src/app/views/workflow/show/notification/form/workflow.notification.form.component.ts +++ b/ui/src/app/views/workflow/show/notification/form/workflow.notification.form.component.ts @@ -121,11 +121,12 @@ export class WorkflowNotificationFormComponent implements OnInit { createNotification(): void { this.loading = true; this._notification.node_id = []; - this._notification.source_node_ref.forEach(source => { - let n = Workflow.getAllNodes(this.workflow).find(p => p.name === source); - this._notification.node_id.push(n.id); - }); - + if (this._notification.source_node_ref) { + this._notification.source_node_ref.forEach(source => { + let n = Workflow.getAllNodes(this.workflow).find(p => p.name === source); + this._notification.node_id.push(n.id); + }); + } if (this.selectedUsers != null) { this._notification.settings.recipients = this.selectedUsers.split(','); }