Fixing post setState error. Fixes #902 (#903)

This commit is contained in:
Dessalines 2023-01-31 20:09:51 -05:00 committed by GitHub
parent 6cca9a9874
commit 87c30705ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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,
@ -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();
}