forked from mirrors/homebox
fix: refactoring errors (#359)
* #352 - require one date to be set to save * fix many type regressions
This commit is contained in:
parent
4a8ba6231d
commit
97fb94d231
22 changed files with 164 additions and 289 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue