Skip to content

Commit

Permalink
Interactive forms: values for radio buttons (issue mozilla#6995)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuryakov authored and timvandermeij committed Feb 7, 2017
1 parent d580ba1 commit 35bf7f4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/core/annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -786,14 +786,12 @@ var ButtonWidgetAnnotation = (function ButtonWidgetAnnotationClosure() {
// The parent field's `V` entry holds a `Name` object with the appearance
// state of whichever child field is currently in the "on" state.
var fieldParent = params.dict.get('Parent');
if (!isDict(fieldParent) || !fieldParent.has('V')) {
return;
}
var fieldParentValue = fieldParent.get('V');
if (!isName(fieldParentValue)) {
return;
if (isDict(fieldParent) && fieldParent.has('V')) {
var fieldParentValue = fieldParent.get('V');
if (isName(fieldParentValue)) {
this.data.fieldValue = fieldParentValue.name;
}
}
this.data.fieldValue = fieldParentValue.name;

// The button's value corresponds to its appearance state.
var appearanceStates = params.dict.get('AP');
Expand Down

0 comments on commit 35bf7f4

Please sign in to comment.