From d4fd000ccfc4f9c128cf178755dd3b1df0cf3894 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Tue, 21 Jul 2015 15:55:34 -0400
Subject: Added handling for when the user is ^ responding to a post that gets
 deleted

---
 web/react/components/create_post.jsx | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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

diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx
index 7b7e38ac2..efb5efd80 100644
--- a/web/react/components/create_post.jsx
+++ b/web/react/components/create_post.jsx
@@ -92,7 +92,13 @@ 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 {
+                        state.server_error = err.message;
+                    }
+
                     state.submitting = false;
                     this.setState(state);
                 }.bind(this)
-- 
cgit v1.2.3-1-g7c22

