mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
prevent the use of confusing globals
This commit is contained in:
parent
fd102348ce
commit
6159eca8f8
18 changed files with 44 additions and 34 deletions
|
@ -5,8 +5,8 @@
|
|||
}
|
||||
|
||||
const script = document.createElement('script');
|
||||
if (self.dashboardVersion) {
|
||||
src += `?v=${self.dashboardVersion}`;
|
||||
if (window.dashboardVersion) {
|
||||
src += `?v=${window.dashboardVersion}`;
|
||||
}
|
||||
script.src = src;
|
||||
script.setAttribute('async', '');
|
||||
|
@ -35,10 +35,10 @@
|
|||
// Promise() being missing on some legacy browser, and a funky one
|
||||
// is Promise() present but buggy on WebOS 2
|
||||
window.Promise = undefined;
|
||||
self.Promise = undefined;
|
||||
window.Promise = undefined;
|
||||
}
|
||||
|
||||
if (!self.Promise) {
|
||||
if (!window.Promise) {
|
||||
// Load Promise polyfill if they are not natively supported
|
||||
injectScriptElement(
|
||||
'./libraries/npo.js',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue