Skip to content

Commit 3c0a76c

Browse files
authored
fix(ui): allow to edit notifications without pipelines (#6111)
1 parent 881ed4b commit 3c0a76c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ui/src/app/views/workflow/show/notification/form/workflow.notification.form.component.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,12 @@ export class WorkflowNotificationFormComponent implements OnInit {
121121
createNotification(): void {
122122
this.loading = true;
123123
this._notification.node_id = [];
124-
this._notification.source_node_ref.forEach(source => {
125-
let n = Workflow.getAllNodes(this.workflow).find(p => p.name === source);
126-
this._notification.node_id.push(n.id);
127-
});
128-
124+
if (this._notification.source_node_ref) {
125+
this._notification.source_node_ref.forEach(source => {
126+
let n = Workflow.getAllNodes(this.workflow).find(p => p.name === source);
127+
this._notification.node_id.push(n.id);
128+
});
129+
}
129130
if (this.selectedUsers != null) {
130131
this._notification.settings.recipients = this.selectedUsers.split(',');
131132
}

0 commit comments

Comments
 (0)