mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 06:28:34 +01:00
fix: PR #347 broke ItemCard component, this fixes it.
Sets the locationFlatTree to be an optional prop for the Card component. With a default of an empty array.
This commit is contained in:
@@ -69,13 +69,14 @@
|
||||
},
|
||||
locationFlatTree: {
|
||||
type: Array as () => FlatTreeItem[],
|
||||
required: true,
|
||||
required: false,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const locationString = computed(() => {
|
||||
return props.locationFlatTree.find(l => l.id === props.item.location.id)?.treeString || props.item.location.name;
|
||||
});
|
||||
const locationString = computed(
|
||||
() => props.locationFlatTree.find(l => l.id === props.item.location?.id)?.treeString || props.item.location?.name
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="css"></style>
|
||||
|
||||
Reference in New Issue
Block a user