]> Untitled Git - lemmy.git/commitdiff
Try to fix post creation bug.
authorDessalines <tyhou13@gmx.com>
Sun, 5 Apr 2020 14:11:16 +0000 (10:11 -0400)
committerDessalines <tyhou13@gmx.com>
Sun, 5 Apr 2020 14:11:16 +0000 (10:11 -0400)
ui/src/components/post.tsx

index f51ba6ff91c62b6ef24578c22ded673360b28637..de0f0e329c72bf60d24a7de43e2fcfaa89a427f1 100644 (file)
@@ -460,7 +460,7 @@ export class Post extends Component<any, PostState> {
     } else if (res.op == UserOperation.Search) {
       let data = res.data as SearchResponse;
       this.state.crossPosts = data.posts.filter(
-        p => p.id != this.state.post.id
+        p => p.id != Number(this.props.match.params.id)
       );
       this.setState(this.state);
     } else if (res.op == UserOperation.TransferSite) {