diff --git a/src/display/api.js b/src/display/api.js index 4cd74a301..ada62580a 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -2008,7 +2008,9 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) { // We want this function to fail in case if createObjectURL or Blob do not // exist or fail for some reason -- our Worker creation will fail anyway. const wrapper = `await import("${url}");`; - return URL.createObjectURL(new Blob([wrapper])); + return URL.createObjectURL( + new Blob([wrapper], { type: "text/javascript" }) + ); }; }