mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 18:40:03 +00:00
Carousel: omit config merging in jQueryInterface after we create the instance
This is already done inside `getOrCreateInstance` method
This commit is contained in:
parent
3ef6a435be
commit
28f150d720
@ -417,14 +417,6 @@ class Carousel extends BaseComponent {
|
|||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
const data = Carousel.getOrCreateInstance(this, config)
|
const data = Carousel.getOrCreateInstance(this, config)
|
||||||
|
|
||||||
let { _config } = data
|
|
||||||
if (typeof config === 'object') {
|
|
||||||
_config = {
|
|
||||||
..._config,
|
|
||||||
...config
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof config === 'number') {
|
if (typeof config === 'number') {
|
||||||
data.to(config)
|
data.to(config)
|
||||||
return
|
return
|
||||||
@ -439,7 +431,7 @@ class Carousel extends BaseComponent {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_config.interval && _config.ride) {
|
if (data._config.interval && data._config.ride) {
|
||||||
data.pause()
|
data.pause()
|
||||||
data.cycle()
|
data.cycle()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user