From 3895599c8f6ddc987a5c92ded800228547348dc6 Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Mon, 15 Jun 2015 11:09:57 -0700
Subject: Error messages revolving around comment creation appear clientside
 unless we have a better solution in place

---
 web/react/components/create_comment.jsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'web/react/components/create_comment.jsx')

diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx
index 0b8eb4a07..9bcbad079 100644
--- a/web/react/components/create_comment.jsx
+++ b/web/react/components/create_comment.jsx
@@ -55,9 +55,15 @@ module.exports = React.createClass({
 
             }.bind(this),
             function(err) {
+                var state = {};
+                state.server_error = err.message;
+
                 if (err.message === "Invalid RootId parameter") {
                     if ($('#post_deleted').length > 0) $('#post_deleted').modal('show');
                 }
+                else {
+                    this.setState(state);
+                }
             }.bind(this)
         );
     },
-- 
cgit v1.2.3-1-g7c22

