1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #1855 from MrTimscampi/global-fix

Fix bad global restriction
This commit is contained in:
dkanada 2020-08-30 12:55:13 +09:00 committed by GitHub
commit 507b477117
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -26,7 +26,8 @@
}); });
} }
window.addEventListener('notificationclick', function (event) { /* eslint-disable-next-line no-restricted-globals -- self is valid in a serviceworker environment */
self.addEventListener('notificationclick', function (event) {
var notification = event.notification; var notification = event.notification;
notification.close(); notification.close();

View file

@ -35,7 +35,8 @@
// Promise() being missing on some legacy browser, and a funky one // Promise() being missing on some legacy browser, and a funky one
// is Promise() present but buggy on WebOS 2 // is Promise() present but buggy on WebOS 2
window.Promise = undefined; window.Promise = undefined;
window.Promise = undefined; /* eslint-disable-next-line no-restricted-globals -- Explicit check on self needed */
self.Promise = undefined;
} }
if (!window.Promise) { if (!window.Promise) {