From: GeoSot Date: Wed, 9 Mar 2022 22:01:55 +0000 (+0200) Subject: Carousel: omit config merging in jQueryInterface after we create the instance X-Git-Tag: v5.2.0-beta1~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28f150d7204788114e2b36555f5e07eb8bdfdbab;p=thirdparty%2Fbootstrap.git Carousel: omit config merging in jQueryInterface after we create the instance This is already done inside `getOrCreateInstance` method --- diff --git a/js/src/carousel.js b/js/src/carousel.js index f5917eb7f4..37ebde3fcc 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -417,14 +417,6 @@ class Carousel extends BaseComponent { return this.each(function () { const data = Carousel.getOrCreateInstance(this, config) - let { _config } = data - if (typeof config === 'object') { - _config = { - ..._config, - ...config - } - } - if (typeof config === 'number') { data.to(config) return @@ -439,7 +431,7 @@ class Carousel extends BaseComponent { return } - if (_config.interval && _config.ride) { + if (data._config.interval && data._config.ride) { data.pause() data.cycle() }