]> Untitled Git - lemmy-ui.git/commitdiff
fix(#1067): Fix language not updating when editing post
authorMarcin Mróz <marcin.mroz@displate.com>
Thu, 8 Jun 2023 18:48:32 +0000 (20:48 +0200)
committerMarcin Mróz <marcin.mroz@displate.com>
Thu, 8 Jun 2023 18:48:32 +0000 (20:48 +0200)
src/shared/components/post/post-form.tsx

index 9f43d69b346d7bd55aabbb7bb29524d2be8f7169..ae69a98ce67e374e60cc4fcfc0c19877260e595a 100644 (file)
@@ -18,9 +18,9 @@ import { i18n } from "../../i18next";
 import { PostFormParams } from "../../interfaces";
 import { UserService, WebSocketService } from "../../services";
 import {
-  Choice,
   archiveTodayUrl,
   capitalizeFirstLetter,
+  Choice,
   communityToChoice,
   debounce,
   fetchCommunities,
@@ -460,7 +460,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
           body: pForm.body,
           nsfw: pForm.nsfw,
           post_id: pv.post.id,
-          language_id: pv.post.language_id,
+          language_id: pForm.language_id,
           auth,
         };
         WebSocketService.Instance.send(wsClient.editPost(form));