From 4dbc30d52192c19a326d305b7d4b727a7a86b112 Mon Sep 17 00:00:00 2001 From: MathieuG-P Date: Tue, 19 Jul 2022 21:29:01 +0200 Subject: [PATCH] more clean --- src/renderer/services/notification.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); });