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

Add check for funky Promise faced on WebOS 2

This commit is contained in:
Vasily 2020-04-23 18:31:11 +03:00
parent a12691798b
commit 27e725f581

View file

@ -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(