1
0
mirror of https://github.com/bitwarden/web synced 2025-12-10 21:33:16 +00:00

Instantiate all status map arrays on load (#1107)

* Instantiate all status map arrays on load

* Update jslib

* Linter fixes
This commit is contained in:
Matt Gibson
2021-08-04 09:30:06 -04:00
committed by GitHub
parent 2c1b06a5d8
commit 44f624e9a6
3 changed files with 8 additions and 3 deletions

View File

@@ -106,6 +106,10 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
async load() {
const response = await this.getUsers();
this.statusMap.clear();
for (const status of Utils.iterateEnum(this.userStatusType)) {
this.statusMap.set(status, []);
}
this.allUsers = response.data != null && response.data.length > 0 ? response.data : [];
this.allUsers.sort(Utils.getSortFunction(this.i18nService, 'email'));
this.allUsers.forEach(u => {
@@ -311,4 +315,4 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
}
}
}
}