summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/root.jsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/webapp/root.jsx b/webapp/root.jsx
index 3f1edda38..2b54c2174 100644
--- a/webapp/root.jsx
+++ b/webapp/root.jsx
@@ -132,6 +132,7 @@ function preNeedsTeam(nextState, replace, callback) {
// for the current url.
var teamName = Utils.getTeamNameFromUrl();
var team = TeamStore.getByName(teamName);
+ const oldTeamId = TeamStore.getCurrentId();
if (!team) {
browserHistory.push('/');
@@ -143,6 +144,12 @@ function preNeedsTeam(nextState, replace, callback) {
TeamStore.saveMyTeam(team);
TeamStore.emitChange();
+ // If the old team id is null then we will already have the direct
+ // profiles from initial load
+ if (oldTeamId != null) {
+ AsyncClient.getDirectProfiles();
+ }
+
var d1 = $.Deferred(); //eslint-disable-line new-cap
var d2 = $.Deferred(); //eslint-disable-line new-cap