Fixing post_view glitch. Fixes #740 (#741)

This commit is contained in:
Dessalines 2022-08-04 10:28:58 -04:00 committed by GitHub
parent b12c606982
commit b0cfb4fe4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,7 @@ import {
SearchResponse, SearchResponse,
SearchType, SearchType,
SortType, SortType,
toOption,
UserOperation, UserOperation,
wsJsonToRes, wsJsonToRes,
wsUserOp, wsUserOp,
@ -569,8 +570,10 @@ export class Post extends Component<any, PostState> {
} }
commentsTree() { commentsTree() {
let showContextButton = let showContextButton = toOption(this.state.commentTree[0]).match({
getDepthFromComment(this.state.commentTree[0].comment_view.comment) > 0; some: comment => getDepthFromComment(comment.comment_view.comment) > 0,
none: false,
});
return this.state.postRes.match({ return this.state.postRes.match({
some: res => ( some: res => (