Skip to content

Fix carousel buttons#34266

Merged
XhmikosR merged 2 commits intomainfrom
fix-carousel-buttons
Jun 16, 2021
Merged

Fix carousel buttons#34266
XhmikosR merged 2 commits intomainfrom
fix-carousel-buttons

Conversation

@alpadev
Copy link
Copy Markdown
Contributor

@alpadev alpadev commented Jun 16, 2021

Fixes #34226

/cc @GeoSot

@alpadev alpadev requested a review from a team as a code owner June 16, 2021 03:07
Copy link
Copy Markdown
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😻

@XhmikosR XhmikosR merged commit d62ba93 into main Jun 16, 2021
@XhmikosR XhmikosR deleted the fix-carousel-buttons branch June 16, 2021 04:48
Comment thread js/src/carousel.js
...config
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alpa Glad you find it ❤️

Can you explain why did this happened?

As it passes from getOrCreateInstance

 static getOrCreateInstance(element, config = {}) {
    return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)
  } 

I am not sure I understand where it fails :/

and _getConfig does the same process

  _getConfig(config) {
    config = {
      ...Default,
      ...Manipulator.getDataAttributes(this._element),
      ...(typeof config === 'object' ? config : {})
    }
    typeCheckConfig(NAME, config, DefaultType)
    return config
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Carousel controls broken in main

4 participants