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:
parent
a372bf8f4d
commit
4b7f9a8d87
4 changed files with 47 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue