]> Untitled Git - lemmy.git/commitdiff
Forum category changing on edit issue.
authorDessalines <tyhou13@gmx.com>
Thu, 18 Apr 2019 04:07:47 +0000 (21:07 -0700)
committerDessalines <tyhou13@gmx.com>
Thu, 18 Apr 2019 04:07:47 +0000 (21:07 -0700)
- Fixes #69

ui/src/components/community-form.tsx

index 056c29dca00369c2dca8bc28201b4e7ba754462d..0613ef4d25e0bd8287107fd2ed86cd84adca3c62 100644 (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;