From ca5d24385f78e8021cb4d2099177ec63fb0c5af2 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Mon, 17 Apr 2023 00:21:49 +0200 Subject: Fix errors on setups with no Notifications/SpeechSynthesis support --- src/api/Notifications/Notifications.tsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/api') diff --git a/src/api/Notifications/Notifications.tsx b/src/api/Notifications/Notifications.tsx index c842ec8..600ea63 100644 --- a/src/api/Notifications/Notifications.tsx +++ b/src/api/Notifications/Notifications.tsx @@ -77,6 +77,8 @@ function _showNotification(notification: NotificationData, id: number) { } function shouldBeNative() { + if (typeof Notification === "undefined") return false; + const { useNative } = Settings.notifications; if (useNative === "always") return true; if (useNative === "not-focused") return !document.hasFocus(); -- cgit