diff --git a/ui-ngx/src/app/shared/components/notification/notification.component.ts b/ui-ngx/src/app/shared/components/notification/notification.component.ts index b5ce44fe54..95ab59884c 100644 --- a/ui-ngx/src/app/shared/components/notification/notification.component.ts +++ b/ui-ngx/src/app/shared/components/notification/notification.component.ts @@ -100,7 +100,7 @@ export class NotificationComponent implements OnInit { const stateObject: StateObject = {}; if (this.notification.additionalConfig.actionButtonConfig.setEntityIdInState) { stateObject.params = { - entityId: this.notification.info.stateEntityId ?? null + entityId: this.notification.info?.stateEntityId ?? null }; } else { stateObject.params = {}; diff --git a/ui-ngx/src/app/shared/models/notification.models.ts b/ui-ngx/src/app/shared/models/notification.models.ts index 2bb00fe745..010d245496 100644 --- a/ui-ngx/src/app/shared/models/notification.models.ts +++ b/ui-ngx/src/app/shared/models/notification.models.ts @@ -35,7 +35,7 @@ export interface Notification { readonly type: NotificationType; readonly subject: string; readonly text: string; - readonly info: NotificationInfo; + readonly info?: NotificationInfo; readonly status: NotificationStatus; readonly createdTime: number; readonly additionalConfig?: WebDeliveryMethodAdditionalConfig;