]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Carousel: omit config merging in jQueryInterface after we create the instance
authorGeoSot <geo.sotis@gmail.com>
Wed, 9 Mar 2022 22:01:55 +0000 (00:01 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Thu, 10 Mar 2022 13:22:14 +0000 (15:22 +0200)
This is already done inside `getOrCreateInstance` method

js/src/carousel.js

index f5917eb7f41ac32d5d0cc56c079e4182ad8f04f9..37ebde3fcc17472263e22fd83ef527cd112c7efd 100644 (file)
@@ -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()
       }