fix(dashboard): sort by name alphabetically if no theres color
This commit is contained in:
parent
e9f563a1bc
commit
10af7be278
@ -126,6 +126,8 @@ function sort<T extends Member|Group>(list: T[], options: ListOptions): T[] {
|
|||||||
let aa = Number("0x" + a.color);
|
let aa = Number("0x" + a.color);
|
||||||
let bb = Number("0x" + b.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 (a.color === null) return 1;
|
||||||
if (b.color === null) return -1;
|
if (b.color === null) return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user