From 63c62116782a51249c846caeeef1d7430ed2491f Mon Sep 17 00:00:00 2001 From: Bj Tecu Date: Mon, 28 Dec 2020 19:51:41 -0500 Subject: [PATCH] Check all radio buttons in a group when deciding if the appearance needs to be updated. (#720) --- src/api/form/PDFRadioGroup.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/form/PDFRadioGroup.ts b/src/api/form/PDFRadioGroup.ts index a9bc7083f..acb17dc7a 100644 --- a/src/api/form/PDFRadioGroup.ts +++ b/src/api/form/PDFRadioGroup.ts @@ -402,10 +402,13 @@ export default class PDFRadioGroup extends PDFField { const widget = widgets[idx]; const value = this.acroField.getValue(); const normal = widget.getAppearances()?.normal; - return !(normal instanceof PDFDict && normal.has(value)); + + if (normal instanceof PDFDict && normal.has(value)) { + return false; + } } - return false; + return true; } /**