From 2d8b81170ba80a68865dc6305186a66099d418a2 Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Fri, 24 Jul 2015 09:03:43 -0700
Subject: Added precautions to avoid incorrect data display to the user by
 clearing modal after every close

---
 web/react/components/removed_from_channel_modal.jsx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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

diff --git a/web/react/components/removed_from_channel_modal.jsx b/web/react/components/removed_from_channel_modal.jsx
index 3a5a58d5e..b815e5d1d 100644
--- a/web/react/components/removed_from_channel_modal.jsx
+++ b/web/react/components/removed_from_channel_modal.jsx
@@ -9,6 +9,9 @@ module.exports = React.createClass({
     handleClose: function() {
       var townSquare = ChannelStore.getByName("town-square");
       utils.switchChannel(townSquare);
+
+      $(this.refs.title.getDOMNode()).text("")
+      $(this.refs.body.getDOMNode()).text("");
     },
     componentDidMount: function() {
       $(this.getDOMNode()).on('hidden.bs.modal',this.handleClose);
@@ -26,10 +29,10 @@ module.exports = React.createClass({
                       <div className="modal-content">
                         <div className="modal-header">
                           <button type="button" className="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-                          <h4 className="modal-title" />
+                          <h4 ref="title" className="modal-title" />
                         </div>
                         <div className="modal-body">
-                            <p />
+                            <p ref="body" />
                         </div>
                         <div className="modal-footer">
                           <button type="button" className="btn btn-primary" data-dismiss="modal">Okay</button>
-- 
cgit v1.2.3-1-g7c22

