Merge branch 'notifications-sort-fix' into 'develop'
Notifications: parseInt ID when sorting See merge request soapbox-pub/soapbox-fe!259
This commit is contained in:
commit
ffb6f7fd67
|
@ -32,8 +32,9 @@ const initialState = ImmutableMap({
|
||||||
|
|
||||||
// For sorting the notifications
|
// For sorting the notifications
|
||||||
const comparator = (a, b) => {
|
const comparator = (a, b) => {
|
||||||
if (a.get('id') < b.get('id')) return 1;
|
const parse = m => parseInt(m.get('id'), 10);
|
||||||
if (a.get('id') > b.get('id')) return -1;
|
if (parse(a) < parse(b)) return 1;
|
||||||
|
if (parse(a) > parse(b)) return -1;
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue