Skip to content

Commit

Permalink
Merge pull request #17265 from Snuffleupagus/createCDNWrapper-blob-type
Browse files Browse the repository at this point in the history
Set a type for the `Blob` used in `createCDNWrapper` (issue 17259)
  • Loading branch information
timvandermeij authored Nov 12, 2023
2 parents 26fcd26 + ade692f commit 37a8311
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/display/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" })
);
};
}

Expand Down

0 comments on commit 37a8311

Please sign in to comment.