sort stats

This commit is contained in:
Alex Yatskov 2017-09-21 23:20:51 -07:00
parent fe859a96cd
commit 3d87615917

View File

@ -190,6 +190,18 @@ class Translator {
group.push(dictTagSanitize(stat));
}
for (const category in stats) {
stats[category].sort((a, b) => {
if (a.notes < b.notes) {
return -1;
} else if (a.notes > b.notes) {
return 1;
} else {
return 0;
}
});
}
return stats;
}
}