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

Empty fields are 0 when using AFSimple_Calculate

It fixes #18536 and #18532.
This commit is contained in:
Calixte Denizet 2024-08-02 21:49:00 +02:00
parent a372bf8f4d
commit 4b7f9a8d87
4 changed files with 47 additions and 4 deletions

View file

@ -514,14 +514,12 @@ class AForm {
}
for (const child of field.getArray()) {
const number = this.AFMakeNumber(child.value);
if (number !== null) {
values.push(number);
}
values.push(number ?? 0);
}
}
if (values.length === 0) {
event.value = cFunction === "PRD" ? 1 : 0;
event.value = 0;
return;
}