Skip to content

Commit 95a311b

Browse files
authored
Merge pull request #378 from kubero-dev/377-bug-crashing-during-pipeline-creation
#377 Update notifications logic to correctly handle cases where notificat…
2 parents 2096f20 + d33902c commit 95a311b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/modules/notifications.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ export class Notifications {
9494
}
9595
notifications.forEach(notification => {
9696
if (notification.enabled &&
97-
notification.events.includes(message.name) &&
97+
notification.events &&
98+
notification.events?.includes(message.name) &&
9899
(notification.pipelines.length == 0 || notification.pipelines.includes('all') || notification.pipelines.includes(message.pipelineName))
99100
) {
100101
this.sendCustomNotification(notification.type,

0 commit comments

Comments
 (0)