From 87c30705eff0c11caba2ae12c239cc390e3e5c4e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 31 Jan 2023 20:09:51 -0500 Subject: [PATCH] Fixing post setState error. Fixes #902 (#903) --- src/shared/components/post/post.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/components/post/post.tsx b/src/shared/components/post/post.tsx index 637cc92..4c44df7 100644 --- a/src/shared/components/post/post.tsx +++ b/src/shared/components/post/post.tsx @@ -161,7 +161,6 @@ export class Post extends Component { } fetchPost() { - this.setState({ commentsRes: undefined, postRes: undefined }); let auth = myAuth(false); let postForm: GetPost = { id: this.state.postId, @@ -498,6 +497,8 @@ export class Post extends Component { i.setState({ commentSort: CommentSortType[event.target.value], commentViewType: CommentViewType.Tree, + commentsRes: undefined, + postRes: undefined, }); i.fetchPost(); } -- 2.44.1