ensure correct sorting even in presence of undefined values
This commit is contained in:
+1
-2
@@ -2342,9 +2342,8 @@ class ContactsView extends React.Component {
|
||||
unreadThreads += c.unread > 0 ? 1 : 0;
|
||||
contacts.push(c);
|
||||
});
|
||||
|
||||
contacts.sort(function(a, b){
|
||||
return b.touched - a.touched;
|
||||
return (b.touched || 0) - (a.touched || 0);
|
||||
});
|
||||
|
||||
updateFavicon(unreadThreads);
|
||||
|
||||
Reference in New Issue
Block a user