Skip to content

Commit

Permalink
Fixing post setState error. Fixes #902 (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Feb 1, 2023
1 parent 6cca9a9 commit 87c3070
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shared/components/post/post.tsx
Expand Up @@ -161,7 +161,6 @@ export class Post extends Component<any, PostState> {
}

fetchPost() {
this.setState({ commentsRes: undefined, postRes: undefined });
let auth = myAuth(false);
let postForm: GetPost = {
id: this.state.postId,
Expand Down Expand Up @@ -498,6 +497,8 @@ export class Post extends Component<any, PostState> {
i.setState({
commentSort: CommentSortType[event.target.value],
commentViewType: CommentViewType.Tree,
commentsRes: undefined,
postRes: undefined,
});
i.fetchPost();
}
Expand Down

0 comments on commit 87c3070

Please sign in to comment.