forked from nutomic/lemmy
parent
aa060f245a
commit
e73d28f5f2
1 changed files with 3 additions and 1 deletions
|
@ -160,7 +160,9 @@ export class CommunityForm extends Component<CommunityFormProps, CommunityFormSt
|
||||||
} else if (op == UserOperation.ListCategories){
|
} else if (op == UserOperation.ListCategories){
|
||||||
let res: ListCategoriesResponse = msg;
|
let res: ListCategoriesResponse = msg;
|
||||||
this.state.categories = res.categories;
|
this.state.categories = res.categories;
|
||||||
|
if (!this.props.community) {
|
||||||
this.state.communityForm.category_id = res.categories[0].id;
|
this.state.communityForm.category_id = res.categories[0].id;
|
||||||
|
}
|
||||||
this.setState(this.state);
|
this.setState(this.state);
|
||||||
} else if (op == UserOperation.CreateCommunity) {
|
} else if (op == UserOperation.CreateCommunity) {
|
||||||
let res: CommunityResponse = msg;
|
let res: CommunityResponse = msg;
|
||||||
|
|
Loading…
Reference in a new issue