From: Dessalines Date: Mon, 18 May 2020 13:50:05 +0000 (-0400) Subject: Fixing issue with empty crossposts. X-Git-Url: http://these/git/readmes/%7B%60%24%7BwebArchiveUrl%7D/save/static/%24%7BappleTouchIcon%7D?a=commitdiff_plain;h=b5c1fec845a0a59dae10faace7418c1756f2998f;p=lemmy.git Fixing issue with empty crossposts. --- diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx index bf3694ba..297d0465 100644 --- a/ui/src/components/post.tsx +++ b/ui/src/components/post.tsx @@ -457,7 +457,9 @@ export class Post extends Component { this.state.crossPosts = data.posts.filter( p => p.id != Number(this.props.match.params.id) ); - this.state.post.duplicates = this.state.crossPosts; + if (this.state.crossPosts.length) { + this.state.post.duplicates = this.state.crossPosts; + } this.setState(this.state); } else if (res.op == UserOperation.TransferSite) { let data = res.data as GetSiteResponse;