diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index 3c8979331..dee245a44 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -74,24 +74,6 @@ if ( globalThis.Promise = require("core-js/es/promise/index.js"); })(); - // Support: Safari - (function checkURL() { - if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")) { - // Prevent "require is not a function" errors in development mode, - // since the `URL` constructor should be available in modern browers. - return; - } else if (!PDFJSDev.test("GENERIC")) { - // The `URL` constructor is assumed to be available in the extension - // builds. - return; - } else if (PDFJSDev.test("IMAGE_DECODERS")) { - // The current image decoders don't use the `URL` constructor, so it - // doesn't need to be polyfilled for the IMAGE_DECODERS build target. - return; - } - globalThis.URL = require("core-js/web/url.js"); - })(); - // Support: Safari<10.1, Node.js (function checkReadableStream() { if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("IMAGE_DECODERS")) {