Skip to content

Commit

Permalink
Fix users list
Browse files Browse the repository at this point in the history
Should not skip the first observable emission when we only have one user (which causes the loading indicator to keep loading since the first & only user data were skipped)
  • Loading branch information
AXeL-dev committed Oct 30, 2020
1 parent 23e950e commit 56babc8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class UsersListComponent implements OnInit, OnDestroy {
this.isLoading = true;
// Get all users
this.allUsers = this.users.getAll().pipe(
skip(this.currentUser.data ? 1 : 0), // workaround to skip first emitted value when currentUser subscription is running
//skip(this.currentUser.data ? 1 : 0), // workaround to skip first emitted value when currentUser subscription is running (not working when we only have 1 user)
map((users: User[]) => {
// Filter by role
if (params.role) {
Expand Down

0 comments on commit 56babc8

Please sign in to comment.