Fix same isMedal state sort
parent
3b30ea8521
commit
7e970940ae
|
@ -139,7 +139,7 @@ let addDecorationsAndSave = (userId, loadedImage, res, next) => {
|
||||||
//TODO: simplify this sorting hell
|
//TODO: simplify this sorting hell
|
||||||
awardings.sort((a1, a2) => {
|
awardings.sort((a1, a2) => {
|
||||||
if (!a1.decorationId.isMedal && !a2.decorationId.isMedal) {
|
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) {
|
||||||
if (a1.date < a2.date) {
|
if (a1.date < a2.date) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue