summaryrefslogtreecommitdiffstats
path: root/webapp/stores
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-11-01 15:50:34 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-11-01 15:50:34 -0400
commitb0f38f8a84ae0b7cba43c7d12a19f8f3cb79e9b0 (patch)
tree376a9d7ca30c9c917b6864bcf5c0021635a05f66 /webapp/stores
parent60a43a5b4ff1e2f5b8d67419611b8f62d8b5412d (diff)
downloadchat-b0f38f8a84ae0b7cba43c7d12a19f8f3cb79e9b0.tar.gz
chat-b0f38f8a84ae0b7cba43c7d12a19f8f3cb79e9b0.tar.bz2
chat-b0f38f8a84ae0b7cba43c7d12a19f8f3cb79e9b0.zip
Fixing websocket and team store issues when leaving team (#4412)
Diffstat (limited to 'webapp/stores')
-rw-r--r--webapp/stores/team_store.jsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/webapp/stores/team_store.jsx b/webapp/stores/team_store.jsx
index 8a3457a4d..858e2688e 100644
--- a/webapp/stores/team_store.jsx
+++ b/webapp/stores/team_store.jsx
@@ -176,11 +176,9 @@ class TeamStoreClass extends EventEmitter {
}
removeMyTeamMember(teamId) {
- for (var index in this.my_team_members) {
- if (this.my_team_members.hasOwnProperty(index)) {
- if (this.my_team_members[index].team_id === teamId) {
- Reflect.deleteProperty(this.my_team_members, index);
- }
+ for (let i = 0; i < this.my_team_members.length; i++) {
+ if (this.my_team_members[i].team_id === teamId) {
+ this.my_team_members.splice(i, 1);
}
}
}