Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbfd1ece

Browse files
committed
fix(CCarousel): Uncaught TypeError: Cannot read properties of null (reading 'getBoundingClientRect')
1 parent51ce9d1 commitbfd1ece

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎packages/coreui-vue/src/components/carousel/CCarousel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const CCarousel = defineComponent({
119119
constnextItemWhenVisible=()=>{
120120
// Don't call next when the page isn't visible
121121
// or the carousel or its parent isn't visible
122-
if(!document.hidden&&isInViewport(carouselRef.value)){
122+
if(!document.hidden&&carouselRef.value&&isInViewport(carouselRef.value)){
123123
handleControlClick('next')
124124
}
125125
}
@@ -142,7 +142,7 @@ const CCarousel = defineComponent({
142142
}
143143

144144
consthandleScroll=()=>{
145-
if(!document.hidden&&isInViewport(carouselRef.value)){
145+
if(!document.hidden&&carouselRef.value&&isInViewport(carouselRef.value)){
146146
visible.value=true
147147
}else{
148148
visible.value=false

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp