From 3815ab806585afa205c074c0b40ddc31e4314190 Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Thu, 6 Aug 2015 11:05:13 -0700
Subject: Added keys to array-based elements and made getMe asynchronous

---
 web/react/stores/user_store.jsx | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

(limited to 'web/react/stores/user_store.jsx')

diff --git a/web/react/stores/user_store.jsx b/web/react/stores/user_store.jsx
index aff5a0bed..85cb4c9ee 100644
--- a/web/react/stores/user_store.jsx
+++ b/web/react/stores/user_store.jsx
@@ -4,7 +4,6 @@
 var AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
 var EventEmitter = require('events').EventEmitter;
 var assign = require('object-assign');
-var client = require('../utils/client.jsx');
 
 var Constants = require('../utils/constants.jsx');
 var ActionTypes = Constants.ActionTypes;
@@ -73,24 +72,13 @@ var UserStore = assign({}, EventEmitter.prototype, {
          BrowserStore.setGlobalItem("current_user_id", id);
      }
   },
-  getCurrentId: function(skipFetch) {
+  getCurrentId: function() {
     var current_id = this._current_id;
 
     if (current_id == null) {
         current_id = BrowserStore.getGlobalItem("current_user_id");
     }
 
-    // this is a speical case to force fetch the
-    // current user if it's missing
-    // it's synchronous to block rendering
-    if (current_id == null && !skipFetch) {
-      var me = client.getMeSynchronous();
-      if (me != null) {
-        this.setCurrentUser(me);
-        current_id = me.id;
-      }
-    }
-
     return current_id;
   },
   getCurrentUser: function(skipFetch) {
-- 
cgit v1.2.3-1-g7c22

