mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-01 08:41:14 +00:00
Fixing map.
This commit is contained in:
parent
d550fae703
commit
ac12f56927
1 changed files with 4 additions and 5 deletions
|
@ -263,17 +263,16 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
|||
community_id: getIdFromString(selectedCommunityChoice.value),
|
||||
},
|
||||
communitySearchOptions: [selectedCommunityChoice].concat(
|
||||
(
|
||||
this.props.initialCommunities?.map(cv => communityToChoice(cv)) ??
|
||||
[]
|
||||
).filter(option => option.value !== selectedCommunityChoice.value),
|
||||
(this.props.initialCommunities?.map(communityToChoice) ?? []).filter(
|
||||
option => option.value !== selectedCommunityChoice.value,
|
||||
),
|
||||
),
|
||||
};
|
||||
} else {
|
||||
this.state = {
|
||||
...this.state,
|
||||
communitySearchOptions:
|
||||
this.props.initialCommunities?.map(cv => communityToChoice(cv)) ?? [],
|
||||
this.props.initialCommunities?.map(communityToChoice) ?? [],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue