Add check for funky Promise faced on WebOS 2
This commit is contained in:
parent
a12691798b
commit
27e725f581
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) {
|
||||
// Load Promise polyfill if they are not natively supported
|
||||
injectScriptElement(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue