mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #1119 from JustAMan/workaround-buggy-promise
Add check for funky Promise faced on WebOS 2
This commit is contained in:
commit
bd57d5dfb1
1 changed files with 10 additions and 0 deletions
|
@ -29,6 +29,16 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Promise.resolve();
|
||||||
|
} catch (ex) {
|
||||||
|
// this checks for several cases actually, typical is
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
if (!self.Promise) {
|
if (!self.Promise) {
|
||||||
// Load Promise polyfill if they are not natively supported
|
// Load Promise polyfill if they are not natively supported
|
||||||
injectScriptElement(
|
injectScriptElement(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue