fix(dashboard): sort by name alphabetically if no theres color

This commit is contained in:
Jake Fulmine 2023-01-21 21:07:55 +01:00
parent e9f563a1bc
commit 10af7be278

View File

@ -126,6 +126,8 @@ function sort<T extends Member|Group>(list: T[], options: ListOptions): T[] {
let aa = Number("0x" + a.color);
let bb = Number("0x" + b.color);
if (a.color === b.color) return a.name.localeCompare(b.name);
if (a.color === null) return 1;
if (b.color === null) return -1;