mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #13735 from Snuffleupagus/bug-1720411
Ensure that the field value, for checkboxes, refers to an existing appearance state (bug 1720411)
This commit is contained in:
commit
07955fa1d3
4 changed files with 26 additions and 12 deletions
|
@ -2082,6 +2082,11 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
|
|||
// The /Off appearance is optional.
|
||||
exportValues.push("Off");
|
||||
}
|
||||
// Don't use a "V" entry pointing to a non-existent appearance state,
|
||||
// see e.g. bug1720411.pdf where it's an *empty* Name-instance.
|
||||
if (!exportValues.includes(this.data.fieldValue)) {
|
||||
this.data.fieldValue = null;
|
||||
}
|
||||
if (exportValues.length !== 2) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue