Notifications: parseInt ID when sorting

This commit is contained in:
Alex Gleason 2020-09-27 14:33:21 -05:00
parent aac2b42e9d
commit 83f31b8a00
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 3 additions and 2 deletions

View File

@ -32,8 +32,9 @@ const initialState = ImmutableMap({
// For sorting the notifications
const comparator = (a, b) => {
if (a.get('id') < b.get('id')) return 1;
if (a.get('id') > b.get('id')) return -1;
const parse = m => parseInt(m.get('id'), 10);
if (parse(a) < parse(b)) return 1;
if (parse(a) > parse(b)) return -1;
return 0;
};