diff options
author | sualko <klaus@jsxc.org> | 2022-01-02 20:11:06 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2022-01-02 20:11:06 +0300 |
commit | 8bbaae6bec60bb75d10f665353d2bc56aba1d486 (patch) | |
tree | ff4e4103c8f1dce3fa69c118997e03c43a0411d3 | |
parent | 3259aae6d7e27d45d2f95a9e17566396603e0f10 (diff) |
fix: check for notification api
fix #1063
-rw-r--r-- | src/Notification.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Notification.ts b/src/Notification.ts index d1ac53ae..2daaa55b 100644 --- a/src/Notification.ts +++ b/src/Notification.ts @@ -55,6 +55,12 @@ export default class Notification { } public static async notify(settings: INotificationSettings) { + if (typeof NotificationAPI === 'undefined') { + Log.debug('Drop notification, because notification API not available'); + + return; + } + if (!Notification.getOption('enable')) { Log.debug('Drop notification, because notifications are disabled.'); |