Remove unneeded this.#signatureData = null; lines in src/core/document.js

Given that this is the *initial value* of the field, setting it again when no signatures exist is pointless.
This commit is contained in:
Jonas Jenwald 2026-07-04 12:57:04 +02:00
parent 5b100c4509
commit 20e0d6de08

View File

@ -2133,12 +2133,10 @@ class PDFDocument {
.ensureDoc("formInfo")
.then(async formInfo => {
if (!formInfo.hasSignatures || !formInfo.hasFields) {
this.#signatureData = null;
return null;
}
const annotationGlobals = await this.annotationGlobals;
if (!annotationGlobals) {
this.#signatureData = null;
return null;
}
const fields = annotationGlobals.acroForm.get("Fields");