diff options
author | Vendicated <vendicated@riseup.net> | 2023-04-17 00:21:49 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-04-17 00:21:49 +0200 |
commit | ca5d24385f78e8021cb4d2099177ec63fb0c5af2 (patch) | |
tree | 0294deb33b76c8e27c5e0d82752463ee7d6170e3 /src/api/Notifications | |
parent | cb3bd4b8818aca279511c95b25eaefd639bd6a8c (diff) | |
download | Vencord-ca5d24385f78e8021cb4d2099177ec63fb0c5af2.tar.gz Vencord-ca5d24385f78e8021cb4d2099177ec63fb0c5af2.tar.bz2 Vencord-ca5d24385f78e8021cb4d2099177ec63fb0c5af2.zip |
Fix errors on setups with no Notifications/SpeechSynthesis support
Diffstat (limited to 'src/api/Notifications')
-rw-r--r-- | src/api/Notifications/Notifications.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
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(); |