1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Simplify JpxImage.setOptions a little bit

After PR 19392 we're only invoking this method *once* per document, hence the early-return branch shouldn't be necessary any more.
This commit is contained in:
Jonas Jenwald 2025-02-22 13:38:10 +01:00
parent 641e2f506e
commit 637e95985a
2 changed files with 1 additions and 4 deletions

View file

@ -38,9 +38,6 @@ class JpxImage {
static #wasmUrl = null;
static setOptions({ handler, useWasm, useWorkerFetch, wasmUrl }) {
if (this.#buffer || this.#modulePromise) {
return;
}
this.#useWasm = useWasm;
this.#useWorkerFetch = useWorkerFetch;
this.#wasmUrl = wasmUrl;

View file

@ -70,7 +70,7 @@ class BasePdfManager {
FeatureTest.isImageDecoderSupported;
this.evaluatorOptions = Object.freeze(evaluatorOptions);
// Initially image-options once per document.
// Initialize image-options once per document.
ImageResizer.setOptions(evaluatorOptions);
JpegStream.setOptions(evaluatorOptions);
JpxImage.setOptions({ ...evaluatorOptions, handler });