Skip to content

Commit 1ec8131

Browse files
author
Ian Redpath
committed
removed reference to undefined field, sort correctly on user page
1 parent 67843e1 commit 1ec8131

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

public/project/components/movies/movie.view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h3 class="h4-margins">Libraries With This Title</h3>
105105
<img src="./assets/default_library.png" class="movie-image"[routerLink]="['/Library', { library: library._id }]">
106106
</div>
107107
<div class="library-details">
108-
<span>{{library.name}} ({{library.user.username}})</span>
108+
<span>{{library.name}}</span>
109109
</div>
110110
</div>
111111
</div>

public/project/components/users/users.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ export class Users {
3838
}
3939
calculateMostLibUsers() {
4040
return _.sortBy(this.users, user => {
41-
return user.libraries.length
41+
return -user.libraries.length
4242
})// arbitrary, not sure what the best value here is
4343
}
4444
calculateMostRatingsUsers() {
4545
return _.sortBy(this.users, user => {
46-
return user.ratings.length
46+
return -user.ratings.length
4747
})
4848
}
4949

0 commit comments

Comments
 (0)