Skip to content

Commit

Permalink
fix(mrf): use undefined as default for response display (#7095)
Browse files Browse the repository at this point in the history
  • Loading branch information
justynoh committed Feb 20, 2024
1 parent 7897bef commit bb105e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const processDecryptedContentV3 = async (
.map((ff) => {
const response = responses[ff._id]
if (!response) {
return transformInputsToOutputs(ff, '')
return transformInputsToOutputs(ff)
}
if (response.fieldType === BasicField.Attachment) {
const answer = response.answer as AttachmentFieldResponseV3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const transformToAttachmentOutput = (

const transformToCheckboxOutput = (
schema: CheckboxFieldSchema,
input: CheckboxFieldValues,
input?: CheckboxFieldValues,
): CheckboxResponse => {
let answerArray: string[] = []
if (input !== undefined && input.value) {
Expand All @@ -158,7 +158,7 @@ const transformToCheckboxOutput = (

const transformToRadioOutput = (
schema: RadioFieldSchema,
input: RadioFieldValues,
input?: RadioFieldValues,
): RadioResponse => {
let answer = ''
if (input !== undefined) {
Expand Down Expand Up @@ -210,7 +210,7 @@ const transformToChildOutput = (
*/
export const transformInputsToOutputs = (
field: FormFieldDto,
input: FormFieldValue,
input?: FormFieldValue,
): FieldResponse | null => {
switch (field.fieldType) {
case BasicField.Section:
Expand Down

0 comments on commit bb105e3

Please sign in to comment.