mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-04 06:42:36 +02:00
Don't access "Notification" if the browser does not support it.
This commit is contained in:
parent
38b8cdbb5e
commit
6d4fb93e6b
|
@ -150,7 +150,7 @@ function applySetting(name, value) {
|
|||
autocompletion.disable();
|
||||
}
|
||||
} else if (name === "desktopNotifications") {
|
||||
if (value && Notification.permission !== "granted") {
|
||||
if (("Notification" in window) && value && Notification.permission !== "granted") {
|
||||
Notification.requestPermission(updateDesktopNotificationStatus);
|
||||
} else if (!value) {
|
||||
$warningBlocked.hide();
|
||||
|
|
Loading…
Reference in a new issue