Fix same isMedal state sort

pull/7/head
Florian Hartwich 2017-08-26 18:12:42 +02:00
parent 3b30ea8521
commit 7e970940ae
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ let addDecorationsAndSave = (userId, loadedImage, res, next) => {
//TODO: simplify this sorting hell
awardings.sort((a1, a2) => {
if (!a1.decorationId.isMedal && !a2.decorationId.isMedal) {
if (a1.decorationId.fraction === 'GLOBAL' && a2.decorationId.fraction === 'GLOBAL') {
if (a1.decorationId.fraction === a2.decorationId.fraction) {
if (a1.date !== a2.date) {
if (a1.date < a2.date) {
return -1;