diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-07-13 12:07:50 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-07-13 12:07:50 -0400 |
commit | 6447af758cd27216d036e06b385770999dc213b1 (patch) | |
tree | 82c55cc2e441fa7eb51b57336e91897ee2571bcd /web/react/stores/team_store.jsx | |
parent | 6cc8788193630b802375669c72fab02220cb692a (diff) | |
parent | 6a559febc292c272da24df440d80ae3b26a31d7f (diff) | |
download | chat-6447af758cd27216d036e06b385770999dc213b1.tar.gz chat-6447af758cd27216d036e06b385770999dc213b1.tar.bz2 chat-6447af758cd27216d036e06b385770999dc213b1.zip |
Merge pull request #163 from ralder/fix-and-refactor-browser-store
[webui] second bugfix for pr #150 and refactor BrowserStore
Diffstat (limited to 'web/react/stores/team_store.jsx')
-rw-r--r-- | web/react/stores/team_store.jsx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/web/react/stores/team_store.jsx b/web/react/stores/team_store.jsx index c494cb5b5..b7199a4a8 100644 --- a/web/react/stores/team_store.jsx +++ b/web/react/stores/team_store.jsx @@ -63,22 +63,10 @@ var TeamStore = assign({}, EventEmitter.prototype, { this._storeTeams(teams); }, _storeTeams: function(teams) { - BrowserStore.setItem("user_teams", JSON.stringify(teams)); + BrowserStore.setItem("user_teams", teams); }, _getTeams: function() { - var teams = {}; - - try { - teams = JSON.parse(BrowserStore.getItem("user_teams")); - } - catch (err) { - } - - if (teams == null) { - teams = {}; - } - - return teams; + return BrowserStore.getItem("user_teams", {}); } }); |