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:
@@ -5,7 +5,8 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
||||
document.removeEventListener('click', 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 */
|
||||
Notification.requestPermission();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user