Skip to content

Commit

Permalink
fix: PR feedbacn optional chain
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek305 committed Oct 21, 2024
1 parent 39fbc66 commit 4980051
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function separateResolvedData(field: Field, value: GenericObjectType) {
resolvedData = value;
unResolvedData =
field.schema.multiple === true
? value.map(({ file }: GenericObjectType) => file.uid)
? value.map(({ file }: GenericObjectType) => file?.uid)
: value.uid;
} else if (field.schema.multiple === true) {
resolvedData = [];
Expand Down
2 changes: 1 addition & 1 deletion src/fieldModifierLocation/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function separateResolvedData(
resolvedData = value;
unResolvedData =
field.schema.multiple === true
? value.map(({ file }: GenericObjectType) => file.uid)
? value.map(({ file }: GenericObjectType) => file?.uid)
: value.uid;
} else if (field.schema.multiple === true) {
resolvedData = [];
Expand Down

0 comments on commit 4980051

Please sign in to comment.