summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post-listing.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/post-listing.tsx')
-rw-r--r--ui/src/components/post-listing.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx
index d2bfc7bd..46e2a994 100644
--- a/ui/src/components/post-listing.tsx
+++ b/ui/src/components/post-listing.tsx
@@ -160,7 +160,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
}
private get myPost(): boolean {
- return UserService.Instance.loggedIn && this.props.post.creator_id == UserService.Instance.user.id;
+ return UserService.Instance.user && this.props.post.creator_id == UserService.Instance.user.id;
}
handlePostLike(i: PostListing) {
@@ -220,6 +220,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
}
handleModRemoveSubmit(i: PostListing) {
+ event.preventDefault();
let form: PostFormI = {
name: i.props.post.name,
community_id: i.props.post.community_id,