Skip to content

Commit a4c4a3f

Browse files
committed
Fix - VueUiCarouselTable - Remove harmless error when animation runs on unmounted component
1 parent ab2679a commit a4c4a3f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/vue-ui-carousel-table.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,12 @@ function animate(timestamp) {
137137
init.value = 0;
138138
}
139139
140-
tableContainer.value.scrollTo({
141-
top: init.value,
142-
behavior: 'smooth'
143-
});
140+
if (tableContainer.value) {
141+
tableContainer.value.scrollTo({
142+
top: init.value,
143+
behavior: 'smooth'
144+
});
145+
}
144146
145147
lastTimestamp.value = timestamp;
146148
}

0 commit comments

Comments
 (0)