Skip to content

Commit da14866

Browse files
committed
Fixed #Q21 collections-challenges: lower rank
comparision
1 parent a49ac11 commit da14866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

challenges/collections-challenges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ const map = new Map();
480480
481481
arr.forEach(obj => {
482482
if (map.has(obj.id)) {
483-
if (obj.rank > map.get(obj.id)) {
483+
if (obj.rank < map.get(obj.id).rank) {
484484
map.set(obj.id, obj);
485485
}
486486
} else {

0 commit comments

Comments
 (0)