mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-07 07:35:46 +02:00
Remove the Promise.try() polyfill
(During rebasing of the previous patches I happened to look at the polyfills and noticed that this one could be removed now.) Note: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/try#browser_compatibility - https://bugzilla.mozilla.org/show_bug.cgi?id=1928493
This commit is contained in:
parent
b3f35b6007
commit
247ee02299
@ -1260,19 +1260,6 @@ function fromBase64Util(str) {
|
|||||||
return stringToBytes(atob(str));
|
return stringToBytes(atob(str));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Remove this once https://bugzilla.mozilla.org/show_bug.cgi?id=1928493
|
|
||||||
// is fixed.
|
|
||||||
if (
|
|
||||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("SKIP_BABEL")) &&
|
|
||||||
typeof Promise.try !== "function"
|
|
||||||
) {
|
|
||||||
Promise.try = function (fn, ...args) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
resolve(fn(...args));
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Remove this once the `javascript.options.experimental.math_sumprecise`
|
// TODO: Remove this once the `javascript.options.experimental.math_sumprecise`
|
||||||
// preference is removed from Firefox.
|
// preference is removed from Firefox.
|
||||||
if (typeof Math.sumPrecise !== "function") {
|
if (typeof Math.sumPrecise !== "function") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user