summaryrefslogtreecommitdiffstats
path: root/web/react/components/create_comment.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2015-10-08 09:30:44 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2015-10-08 09:30:44 -0400
commit21bf9db56cf41e6f02e9f0e80cec997c94a0c726 (patch)
treef3871b2ffe331572bb1b4fa2d3af8b55254c6e17 /web/react/components/create_comment.jsx
parentc189e2bb7681ba01edc9b8c5accd90b94c898d0a (diff)
parentbe8225b761a3009efd1097a0b4dd4d8f44830a33 (diff)
downloadchat-21bf9db56cf41e6f02e9f0e80cec997c94a0c726.tar.gz
chat-21bf9db56cf41e6f02e9f0e80cec997c94a0c726.tar.bz2
chat-21bf9db56cf41e6f02e9f0e80cec997c94a0c726.zip
Merge pull request #948 from rgarmsen2295/plt-167
PLT-167 Fixes issue with trying to comment on a deleted post
Diffstat (limited to 'web/react/components/create_comment.jsx')
-rw-r--r--web/react/components/create_comment.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx
index 9c233ea26..550f85d3d 100644
--- a/web/react/components/create_comment.jsx
+++ b/web/react/components/create_comment.jsx
@@ -106,10 +106,11 @@ export default class CreateComment extends React.Component {
let state = {};
if (err.message === 'Invalid RootId parameter') {
+ PostStore.removePendingPost(post.channel_id, post.pending_post_id);
+
if ($('#post_deleted').length > 0) {
$('#post_deleted').modal('show');
}
- PostStore.removePendingPost(post.pending_post_id);
} else {
post.state = Constants.POST_FAILED;
PostStore.updatePendingPost(post);