diff options
Diffstat (limited to 'webapp/stores')
-rw-r--r-- | webapp/stores/user_store.jsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/webapp/stores/user_store.jsx b/webapp/stores/user_store.jsx index 2d792fa17..8ae1e1404 100644 --- a/webapp/stores/user_store.jsx +++ b/webapp/stores/user_store.jsx @@ -114,6 +114,14 @@ class UserStoreClass extends EventEmitter { return this.getProfile(userId) != null; } + hasTeamProfile(userId) { + return this.getProfiles()[userId]; + } + + hasDirectProfile(userId) { + return this.getDirectProfiles()[userId]; + } + getProfile(userId) { if (userId === this.getCurrentId()) { return this.getCurrentUser(); @@ -194,7 +202,7 @@ class UserStoreClass extends EventEmitter { const currentUser = this.profiles[currentId]; if (currentUser) { if (currentId in this.profiles) { - delete this.profiles[currentId]; + Reflect.deleteProperty(this.profiles, currentId); } this.profiles = profiles; |