summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-05-18 09:50:05 -0400
committerDessalines <tyhou13@gmx.com>2020-05-18 09:50:05 -0400
commitb5c1fec845a0a59dae10faace7418c1756f2998f (patch)
tree8f12e8153b964ba3a150a1628aa875dfa47abdb4 /ui/src/components/post.tsx
parent99e4551cf67d3e71b903f0d7d60133b6158facde (diff)
Fixing issue with empty crossposts.
Diffstat (limited to 'ui/src/components/post.tsx')
-rw-r--r--ui/src/components/post.tsx4
1 files changed, 3 insertions, 1 deletions
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<any, PostState> {
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;