mirror of
https://github.com/mastodon/mastodon
synced 2024-11-28 23:08:25 +09:00
Check for empty "last_status" before sorting DM column (#9207)
* Check for empty "last_status" before sorting * Small touchups for codeclimate
This commit is contained in:
parent
d6c7b01d08
commit
a7e3bd0300
@ -56,7 +56,13 @@ const expandNormalizedConversations = (state, conversations, next) => {
|
||||
|
||||
list = list.concat(items);
|
||||
|
||||
return list.sortBy(x => x.get('last_status'), (a, b) => compareId(a, b) * -1);
|
||||
return list.sortBy(x => x.get('last_status'), (a, b) => {
|
||||
if(a === null || b === null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return compareId(a, b) * -1;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user