diff --git a/src/renderer/services/notification.service.ts b/src/renderer/services/notification.service.ts index 2a99af11..31413fc8 100644 --- a/src/renderer/services/notification.service.ts +++ b/src/renderer/services/notification.service.ts @@ -17,9 +17,9 @@ export class NotificationService{ } public notify(notification: Notification): Promise{ - let resovableNotification: ResolvableNotification; + let resovableNotification: ResolvableNotification = {id: uuidv4(), notification: notification, resolver: null }; const promise = new Promise(resolve => { - resovableNotification = {id: uuidv4(), notification: notification, resolver: resolve } + resovableNotification.resolver = resolve; setTimeout(() => resolve(NotificationResult.NO_CHOICE), notification.duration || 7000); });