From 3f33cf8dcb53d20e67d8abc9214c7192a28dca94 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 16 Apr 2019 16:04:23 -0700 Subject: Before big moderation merge --- ui/src/components/comment-form.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/src/components/comment-form.tsx') diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index 66f3094e..df079ba3 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -23,7 +23,7 @@ export class CommentForm extends Component { auth: null, content: null, post_id: this.props.node ? this.props.node.comment.post_id : this.props.postId, - creator_id: UserService.Instance.loggedIn ? UserService.Instance.user.id : null, + creator_id: UserService.Instance.user ? UserService.Instance.user.id : null, }, buttonTitle: !this.props.node ? "Post" : this.props.edit ? "Edit" : "Reply", } @@ -71,6 +71,7 @@ export class CommentForm extends Component { } handleCommentSubmit(i: CommentForm, event: any) { + event.preventDefault(); if (i.props.edit) { WebSocketService.Instance.editComment(i.state.commentForm); } else { -- cgit v1.2.3