Skip to content

Commit

Permalink
fix: Prevent invalid range for skeleton number
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Jun 21, 2024
1 parent c747090 commit 35c21f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/FilePicker/FileList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const fileContainer = ref<HTMLDivElement>()
}
}
// container height - 50px table header / row height of 50px
skeletonNumber.value = Math.floor((height - 50) / 50)
skeletonNumber.value = Math.max(1, Math.floor((height - 50) / 50))
})
onMounted(() => {
window.addEventListener('resize', resize)
Expand Down

0 comments on commit 35c21f1

Please sign in to comment.