web: sort groups from groupBy<T>

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-04 13:19:34 +02:00
parent d1cde64214
commit 616b1f4a05
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ export function groupBy<T>(objects: T[], callback: (obj: T) => string): Array<[s
const tProviders = m.get(group) || [];
tProviders.push(obj);
});
return Array.from(m);
return Array.from(m).sort();
}
export function first<T>(...args: Array<T | undefined | null>): T {