Merge pull request #1119 from JustAMan/workaround-buggy-promise

Add check for funky Promise faced on WebOS 2
This commit is contained in:
dkanada
2020-04-24 23:15:06 +09:00
committed by GitHub
+10
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) {
// Load Promise polyfill if they are not natively supported
injectScriptElement(