Add default group for endpoints without an group

This commit is contained in:
Oliver Traber 2022-01-16 01:23:22 +01:00
parent 85a84acc42
commit 50f3eff79d
Signed by: Bluemedia
GPG key ID: C7BA47275B086E2C

View file

@ -48,6 +48,9 @@ export default {
groups() { groups() {
// Group // Group
let groups = this.apiData.reduce(function(rv, x) { let groups = this.apiData.reduce(function(rv, x) {
if (!x.group) {
x.group = "Ungrouped";
}
(rv[x["group"]] = rv[x["group"]] || []).push(x); (rv[x["group"]] = rv[x["group"]] || []).push(x);
return rv; return rv;
}, {}); }, {});