mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 06:11:15 +00:00
parent
b12c606982
commit
b0cfb4fe4a
1 changed files with 5 additions and 2 deletions
|
@ -27,6 +27,7 @@ import {
|
|||
SearchResponse,
|
||||
SearchType,
|
||||
SortType,
|
||||
toOption,
|
||||
UserOperation,
|
||||
wsJsonToRes,
|
||||
wsUserOp,
|
||||
|
@ -569,8 +570,10 @@ export class Post extends Component<any, PostState> {
|
|||
}
|
||||
|
||||
commentsTree() {
|
||||
let showContextButton =
|
||||
getDepthFromComment(this.state.commentTree[0].comment_view.comment) > 0;
|
||||
let showContextButton = toOption(this.state.commentTree[0]).match({
|
||||
some: comment => getDepthFromComment(comment.comment_view.comment) > 0,
|
||||
none: false,
|
||||
});
|
||||
|
||||
return this.state.postRes.match({
|
||||
some: res => (
|
||||
|
|
Loading…
Reference in a new issue