Forum category changing on edit issue.

- Fixes #69
This commit is contained in:
Dessalines 2019-04-17 21:07:47 -07:00
parent ab08f5e2c7
commit cb7adae5c9

View file

@ -160,7 +160,9 @@ export class CommunityForm extends Component<CommunityFormProps, CommunityFormSt
} else if (op == UserOperation.ListCategories){
let res: ListCategoriesResponse = msg;
this.state.categories = res.categories;
this.state.communityForm.category_id = res.categories[0].id;
if (!this.props.community) {
this.state.communityForm.category_id = res.categories[0].id;
}
this.setState(this.state);
} else if (op == UserOperation.CreateCommunity) {
let res: CommunityResponse = msg;