Skip to content

Commit

Permalink
bugfix: prevent crash when related project is not returned by /typeah…
Browse files Browse the repository at this point in the history
…eads/projects
  • Loading branch information
martinchristov committed Nov 12, 2019
1 parent 7707cd3 commit e072466
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const ProjectPicker = ({ loading, projects, savedData, formPush, projectId }) =>
render={({ input }) => {
const $options =
projects && projects.length > 0
? ((input.value && state.searchStr.length === 0) ? [projects.find(it => it.id === input.value)].map(({ id, title }) => ({ value: id, label: title })) : state.options)
? ((input.value && state.searchStr.length === 0) ? [projects.find(it => it.id === input.value)].filter(it => it != null).map(({ id, title }) => ({ value: id, label: title })) : state.options)
: [{ value: input.value, label: nameProps.input.value }]
return (
<Select
Expand Down

0 comments on commit e072466

Please # to comment.