diff --git a/core/modules/notification/store/index.ts b/core/modules/notification/store/index.ts index 5744d6ef84..2d377d7f60 100644 --- a/core/modules/notification/store/index.ts +++ b/core/modules/notification/store/index.ts @@ -26,9 +26,11 @@ export const module: Module = { return } commit('add', notification) - setTimeout(() => { - dispatch('removeNotification') - }, notification.timeToLive || 5000) + if (!notification.hasNoTimeout) { + setTimeout(() => { + dispatch('removeNotification') + }, notification.timeToLive || 5000) + } }, removeNotification ({ commit, state }, index?: number) { if (!index) { diff --git a/core/modules/notification/types/NotificationItem.ts b/core/modules/notification/types/NotificationItem.ts index 38f6356a96..8bb6b8fa5d 100644 --- a/core/modules/notification/types/NotificationItem.ts +++ b/core/modules/notification/types/NotificationItem.ts @@ -8,5 +8,6 @@ export default interface NotificationItem { message: string, timeToLive?: number, action1: ActionItem, - action2?: ActionItem + action2?: ActionItem, + hasNoTimeout?: boolean }