Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jsxc/jsxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2022-01-02 20:11:06 +0300
committersualko <klaus@jsxc.org>2022-01-02 20:11:06 +0300
commit8bbaae6bec60bb75d10f665353d2bc56aba1d486 (patch)
treeff4e4103c8f1dce3fa69c118997e03c43a0411d3
parent3259aae6d7e27d45d2f95a9e17566396603e0f10 (diff)
fix: check for notification api
fix #1063
-rw-r--r--src/Notification.ts6
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.');