We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 184509f commit f399c2fCopy full SHA for f399c2f
src/components/smart/Windows.vue
@@ -348,7 +348,11 @@ watch(
348
// We still need setTimeout here because the element might not be fully in position yet
349
setTimeout(() => {
350
const { scrollWidth, clientWidth, scrollLeft } =
351
- scrollContainer.value!
+ scrollContainer.value || {
352
+ scrollWidth: 0,
353
+ clientWidth: 0,
354
+ scrollLeft: 0,
355
+ }
356
const maxScroll = scrollWidth - clientWidth
357
thumbPosition.value = (scrollLeft / maxScroll) * MAX_SCROLL_VALUE
358
}, 300)
0 commit comments