From aac83dcedc644dfc23fc46366e54c65e0c86c5b9 Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Wed, 2 Sep 2015 09:46:40 -0700
Subject: Additional refactoring according to issues not caught by eslint

---
 web/react/components/navbar_dropdown.jsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

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

diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index 7ffaeb712..e818a5c92 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -30,19 +30,18 @@ export default class NavbarDropdown extends React.Component {
         UserStore.addTeamsChangeListener(this.onListenerChange);
         TeamStore.addChangeListener(this.onListenerChange);
 
-        var self = this;
-        $(this.refs.dropdown.getDOMNode()).on('hide.bs.dropdown', function resetDropdown() {
-            self.blockToggle = true;
+        $(React.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', function resetDropdown() {
+            this.blockToggle = true;
             setTimeout(function blockTimeout() {
-                self.blockToggle = false;
-            }, 100);
-        });
+                this.blockToggle = false;
+            }.bind(this), 100);
+        }.bind(this));
     }
     componentWillUnmount() {
         UserStore.removeTeamsChangeListener(this.onListenerChange);
         TeamStore.removeChangeListener(this.onListenerChange);
 
-        $(this.refs.dropdown.getDOMNode()).off('hide.bs.dropdown');
+        $(React.findDOMNode(this.refs.dropdown)).off('hide.bs.dropdown');
     }
     onListenerChange() {
         var newState = getStateFromStores();
-- 
cgit v1.2.3-1-g7c22

