mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-08 06:38:46 +00:00
fix group sorting bug
This commit is contained in:
parent
0653b12104
commit
b393318084
1 changed files with 2 additions and 2 deletions
|
@ -90,12 +90,12 @@ export async function servicesResponse() {
|
||||||
|
|
||||||
if (definedLayouts) {
|
if (definedLayouts) {
|
||||||
const layoutIndex = definedLayouts.findIndex(layout => layout === mergedGroup.name);
|
const layoutIndex = definedLayouts.findIndex(layout => layout === mergedGroup.name);
|
||||||
if (layoutIndex > -1) mergedGroups.splice(layoutIndex, 0, mergedGroup);
|
if (layoutIndex > -1) mergedGroups[layoutIndex] = mergedGroup;
|
||||||
else mergedGroups.push(mergedGroup);
|
else mergedGroups.push(mergedGroup);
|
||||||
} else {
|
} else {
|
||||||
mergedGroups.push(mergedGroup);
|
mergedGroups.push(mergedGroup);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return mergedGroups;
|
return mergedGroups.filter(g => g);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue