Skip to content

Commit

Permalink
fix(core/forms): fix values in form-to-pdf for single and multiple ch…
Browse files Browse the repository at this point in the history
…oices fields
  • Loading branch information
sara-gnucoop authored and robzan8 committed Apr 15, 2021
1 parent 684ce68 commit 95d6998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/forms/form-to-pdf/form-to-pdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function fieldToPdf(
const selectedValues = (field.fieldType === AjfFieldType.SingleChoice) ?
[lookupString(field.name)] :
lookupArrayFunction(context, rep)(field.name);
const selectedChoices = selectedValues.map(v => choices.find(c => c.value = v))
const selectedChoices = selectedValues.map(v => choices.find(c => c.value === v))
.filter(c => c) as AjfChoice<any>[];
return choiceToPdf(field, selectedChoices, translate, context);
case AjfFieldType.Empty:
Expand Down

0 comments on commit 95d6998

Please sign in to comment.