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),
|
community_id: getIdFromString(selectedCommunityChoice.value),
|
||||||
},
|
},
|
||||||
communitySearchOptions: [selectedCommunityChoice].concat(
|
communitySearchOptions: [selectedCommunityChoice].concat(
|
||||||
(
|
(this.props.initialCommunities?.map(communityToChoice) ?? []).filter(
|
||||||
this.props.initialCommunities?.map(cv => communityToChoice(cv)) ??
|
option => option.value !== selectedCommunityChoice.value,
|
||||||
[]
|
),
|
||||||
).filter(option => option.value !== selectedCommunityChoice.value),
|
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
this.state = {
|
this.state = {
|
||||||
...this.state,
|
...this.state,
|
||||||
communitySearchOptions:
|
communitySearchOptions:
|
||||||
this.props.initialCommunities?.map(cv => communityToChoice(cv)) ?? [],
|
this.props.initialCommunities?.map(communityToChoice) ?? [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue