From 999389c6c56468969dbfb25a195eeae00b8b15c5 Mon Sep 17 00:00:00 2001 From: djmaze Date: Thu, 22 Apr 2021 23:53:39 +0200 Subject: [PATCH] Bugfix: wrong Notification.RequestAborted --- dev/App/User.js | 1 + dev/Stores/User/Notification.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/App/User.js b/dev/App/User.js index a606af132..d25298c57 100644 --- a/dev/App/User.js +++ b/dev/App/User.js @@ -5,6 +5,7 @@ import { isPosNumeric, delegateRunOnDestroy, mailToHelper } from 'Common/UtilsUs import { Capa, + Notification, Scope } from 'Common/Enums'; diff --git a/dev/Stores/User/Notification.js b/dev/Stores/User/Notification.js index 23322ceeb..9320129e7 100644 --- a/dev/Stores/User/Notification.js +++ b/dev/Stores/User/Notification.js @@ -7,7 +7,7 @@ import * as Links from 'Common/Links'; /** * Might not work due to the new ServiceWorkerRegistration.showNotification */ -const HTML5Notification = window.Notification ? Notification : null, +const HTML5Notification = window.Notification, HTML5NotificationStatus = () => (HTML5Notification && HTML5Notification.permission) || 'denied', NotificationsDenied = () => 'denied' === HTML5NotificationStatus(), NotificationsGranted = () => 'granted' === HTML5NotificationStatus(),