Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Co-authored-by: Mike <[email protected]>
  • Loading branch information
wbarcovsky and MadeByMike committed Jan 13, 2020
1 parent fef55b5 commit 1158603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lazy-hats-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/fields': patch
---

Fixed work of relation select
2 changes: 1 addition & 1 deletion packages/fields/src/types/Relationship/views/Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default class RelationshipField extends Component {
const { field, onChange } = this.props;
const { many } = field.config;
if (many) {
onChange(option.map(i => i.value));
onChange(option ? option.map(i => i.value) : []);
} else {
onChange(option ? option.value : null);
}
Expand Down

0 comments on commit 1158603

Please sign in to comment.