mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-04 14:33:41 +01:00
fix group sorting bug
This commit is contained in:
parent
0653b12104
commit
b393318084
@ -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…
x
Reference in New Issue
Block a user