mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #16013 from Snuffleupagus/COMPONENTS-rm-inline-attachment-open
Remove inline opening of PDF attachments in the COMPONENTS build
This commit is contained in:
commit
25a6bc4e01
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,10 @@ class DownloadManager {
|
|||
const isPdfData = isPdfFile(filename);
|
||||
const contentType = isPdfData ? "application/pdf" : "";
|
||||
|
||||
if (isPdfData) {
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" || !PDFJSDev.test("COMPONENTS")) &&
|
||||
isPdfData
|
||||
) {
|
||||
let blobUrl = this.#openBlobUrls.get(element);
|
||||
if (!blobUrl) {
|
||||
blobUrl = URL.createObjectURL(new Blob([data], { type: contentType }));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue