From 7203128e999fdd34c92352808ad506746ea64dad Mon Sep 17 00:00:00 2001 From: nickago Date: Thu, 13 Aug 2015 11:00:49 -0700 Subject: Added flux-style error protection on team store call in sidebar --- web/react/stores/team_store.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/react/stores') diff --git a/web/react/stores/team_store.jsx b/web/react/stores/team_store.jsx index e6380d19e..0193d181b 100644 --- a/web/react/stores/team_store.jsx +++ b/web/react/stores/team_store.jsx @@ -64,7 +64,10 @@ var TeamStore = assign({}, EventEmitter.prototype, { return null; }, getCurrentTeamUrl: function() { - return getWindowLocationOrigin() + "/" + this.getCurrent().name; + if(this.getCurrent()) { + return getWindowLocationOrigin() + "/" + this.getCurrent().name; + } + return null; }, storeTeam: function(team) { var teams = this._getTeams(); -- cgit v1.2.3-1-g7c22