diff --git a/src/core/document.js b/src/core/document.js index 8f7ad958ee0732..ca859761c0779b 100644 --- a/src/core/document.js +++ b/src/core/document.js @@ -646,9 +646,8 @@ class Page { } async getStructTree() { - const structTreeRoot = await this.pdfManager.ensureCatalog( - "structTreeRoot" - ); + const structTreeRoot = + await this.pdfManager.ensureCatalog("structTreeRoot"); if (!structTreeRoot) { return null; } diff --git a/src/core/writer.js b/src/core/writer.js index d9223d2f106a02..78a88a669a247a 100644 --- a/src/core/writer.js +++ b/src/core/writer.js @@ -63,13 +63,11 @@ async function writeStream(stream, buffer, transform) { const MIN_LENGTH_FOR_COMPRESSING = 256; if ( - // eslint-disable-next-line no-undef typeof CompressionStream !== "undefined" && (string.length >= MIN_LENGTH_FOR_COMPRESSING || isFilterZeroFlateDecode) ) { try { const byteArray = stringToBytes(string); - // eslint-disable-next-line no-undef const cs = new CompressionStream("deflate"); const writer = cs.writable.getWriter(); writer.write(byteArray); diff --git a/test/unit/pdf_find_controller_spec.js b/test/unit/pdf_find_controller_spec.js index 6201c757f7d8e1..db8b29548f79e4 100644 --- a/test/unit/pdf_find_controller_spec.js +++ b/test/unit/pdf_find_controller_spec.js @@ -722,9 +722,8 @@ describe("pdf_find_controller", function () { pending("Linked test-cases are not supported in Node.js."); } - const { eventBus, pdfFindController } = await initPdfFindController( - "issue14562.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("issue14562.pdf"); await testSearch({ eventBus, @@ -762,9 +761,8 @@ describe("pdf_find_controller", function () { }); it("performs a search in a text containing some Hangul syllables", async function () { - const { eventBus, pdfFindController } = await initPdfFindController( - "bug1771477.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("bug1771477.pdf"); await testSearch({ eventBus, @@ -783,9 +781,8 @@ describe("pdf_find_controller", function () { }); it("performs a search in a text containing an ideographic at the end of a line", async function () { - const { eventBus, pdfFindController } = await initPdfFindController( - "issue15340.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("issue15340.pdf"); await testSearch({ eventBus, @@ -804,9 +801,8 @@ describe("pdf_find_controller", function () { }); it("performs a search in a text containing fullwidth chars", async function () { - const { eventBus, pdfFindController } = await initPdfFindController( - "issue15690.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("issue15690.pdf"); await testSearch({ eventBus, @@ -825,9 +821,8 @@ describe("pdf_find_controller", function () { }); it("performs a search in a text with some Katakana at the end of a line", async function () { - const { eventBus, pdfFindController } = await initPdfFindController( - "issue15759.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("issue15759.pdf"); await testSearch({ eventBus, @@ -862,9 +857,8 @@ describe("pdf_find_controller", function () { pending("Linked test-cases are not supported in Node.js."); } - const { eventBus, pdfFindController } = await initPdfFindController( - "issue12909.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("issue12909.pdf"); await testSearch({ eventBus, @@ -896,9 +890,8 @@ describe("pdf_find_controller", function () { }); it("performs a search in a text with some Hiragana diacritics at the end of a line", async function () { - const { eventBus, pdfFindController } = await initPdfFindController( - "issue16063.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("issue16063.pdf"); await testSearch({ eventBus, @@ -936,9 +929,8 @@ describe("pdf_find_controller", function () { pending("Linked test-cases are not supported in Node.js."); } - const { eventBus, pdfFindController } = await initPdfFindController( - "bug1820909.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("bug1820909.pdf"); await testSearch({ eventBus, @@ -957,9 +949,8 @@ describe("pdf_find_controller", function () { }); it("performs a search in a text with some UTF-32 chars followed by a dash at the end of a line", async function () { - const { eventBus, pdfFindController } = await initPdfFindController( - "bug1820909.1.pdf" - ); + const { eventBus, pdfFindController } = + await initPdfFindController("bug1820909.1.pdf"); await testSearch({ eventBus, diff --git a/web/pdf_link_service.js b/web/pdf_link_service.js index f022d99f2f8de1..3b5935a042e051 100644 --- a/web/pdf_link_service.js +++ b/web/pdf_link_service.js @@ -505,8 +505,8 @@ class PDFLinkService { */ async executeSetOCGState(action) { const pdfDocument = this.pdfDocument; - const optionalContentConfig = await this.pdfViewer - .optionalContentConfigPromise; + const optionalContentConfig = + await this.pdfViewer.optionalContentConfigPromise; if (pdfDocument !== this.pdfDocument) { return; // The document was closed while the optional content resolved.