mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 17:02:45 +08:00
Sorting is hard. This should really fix user profiles.
This commit is contained in:
parent
209ed105f9
commit
96d1ea03e7
|
@ -189,7 +189,7 @@ class UserSerializer < BasicUserSerializer
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
keys.sort! { |a, b| a[:last_used_at].to_time > b[:last_used_at].to_time }
|
keys.sort! { |a, b| a[:last_used_at].to_time <=> b[:last_used_at].to_time }
|
||||||
keys.length > 0 ? keys : nil
|
keys.length > 0 ? keys : nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user