mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Prevent empty carousel from throwing, and staying in a 'sliding' state.
Fixes #24132.
This commit is contained in:
parent
e52df5dce5
commit
2c2ac33564
@ -144,7 +144,9 @@
|
|||||||
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
||||||
if ($.support.transition && this.$element.hasClass('slide')) {
|
if ($.support.transition && this.$element.hasClass('slide')) {
|
||||||
$next.addClass(type)
|
$next.addClass(type)
|
||||||
$next[0].offsetWidth // force reflow
|
if (typeof $next === 'object' && $next.length) {
|
||||||
|
$next[0].offsetWidth // force reflow
|
||||||
|
}
|
||||||
$active.addClass(direction)
|
$active.addClass(direction)
|
||||||
$next.addClass(direction)
|
$next.addClass(direction)
|
||||||
$active
|
$active
|
||||||
|
Loading…
x
Reference in New Issue
Block a user