From 4e181e59efa5fd80cfd9657074cb3336e4de009e Mon Sep 17 00:00:00 2001
From: vkuryakov <vkuryakov@snappii.com>
Date: Mon, 6 Feb 2017 18:57:06 +0300
Subject: [PATCH] Interactive forms: values for radio buttons (issue #6995)

---
 src/core/annotation.js | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/core/annotation.js b/src/core/annotation.js
index 6eeb5d97f..212485448 100644
--- a/src/core/annotation.js
+++ b/src/core/annotation.js
@@ -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');