mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 14:31:55 +01:00
fix: refactoring errors (#359)
* #352 - require one date to be set to save * fix many type regressions
This commit is contained in:
@@ -14,6 +14,10 @@ export function flatTree(tree: TreeItem[]): Ref<FlatTreeItem[]> {
|
||||
// the display is a string of the tree hierarchy separated by breadcrumbs
|
||||
|
||||
function flatten(items: TreeItem[], display: string) {
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const item of items) {
|
||||
v.value.push({
|
||||
id: item.id,
|
||||
@@ -40,5 +44,5 @@ export async function useFlatLocations(): Promise<Ref<FlatTreeItem[]>> {
|
||||
return ref([]);
|
||||
}
|
||||
|
||||
return flatTree(locations.data.items);
|
||||
return flatTree(locations.data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user