Skip to content

Commit d9e44f8

Browse files
committed
Guard the list items height check
1 parent e32d449 commit d9e44f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

client/src/components/FileBrowser.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const calculateVisibleItems = () => {
8989
const listHeight = ref(0);
9090
const visibleItems = ref(0);
9191
// Determine the height of each list item
92-
const listItemHeight = listItems ? listItems[0].clientHeight : 0;
92+
const listItemHeight = listItems && listItems[0] ? listItems[0].clientHeight : 0;
9393
9494
directoryData.value.childrenImages.forEach(() => {
9595
listHeight.value += listItemHeight;

0 commit comments

Comments
 (0)