Skip to content

Commit 4cc897f

Browse files
authored
Merge pull request #280 from DigitalSlideArchive/guard-height
Guard the list items height check
2 parents 9d7cdd4 + d9e44f8 commit 4cc897f

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)