mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Do not call Notification.requestPermission() if it is already granted or denied
This function crashes the app on WebOS 1.2, and notifs do not work on WebOS anyway
This commit is contained in:
parent
ce2c3ad36e
commit
1f8d1184d8
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,8 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
||||||
document.removeEventListener('click', onOneDocumentClick);
|
document.removeEventListener('click', onOneDocumentClick);
|
||||||
document.removeEventListener('keydown', onOneDocumentClick);
|
document.removeEventListener('keydown', onOneDocumentClick);
|
||||||
|
|
||||||
if (window.Notification) {
|
// don't request notification permissions if they're already granted or denied
|
||||||
|
if (window.Notification && window.Notification.permission === "default") {
|
||||||
/* eslint-disable-next-line compat/compat */
|
/* eslint-disable-next-line compat/compat */
|
||||||
Notification.requestPermission();
|
Notification.requestPermission();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue