mirror of
https://github.com/thelounge/thelounge
synced 2024-11-11 15:07:14 +00:00
Merge pull request #2192 from creesch/settingSync
Don't access "Notification" if the browser does not support it
This commit is contained in:
commit
6857c5dd08
1 changed files with 1 additions and 1 deletions
|
@ -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