1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Set parent of radio annotation even if there is no 'V' field

This commit is contained in:
Calixte Denizet 2020-09-15 14:23:08 +02:00
parent b0c7a74a0c
commit 16dd5403c7
2 changed files with 64 additions and 2 deletions

View file

@ -1741,10 +1741,10 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
// The parent field's `V` entry holds a `Name` object with the appearance
// state of whichever child field is currently in the "on" state.
const fieldParent = params.dict.get("Parent");
if (isDict(fieldParent) && fieldParent.has("V")) {
if (isDict(fieldParent)) {
this.parent = params.dict.getRaw("Parent");
const fieldParentValue = fieldParent.get("V");
if (isName(fieldParentValue)) {
this.parent = params.dict.getRaw("Parent");
this.data.fieldValue = this._decodeFormValue(fieldParentValue);
}
}