Carousel: small refactoring, remove unnecessary checks

This commit is contained in:
GeoSot 2022-03-02 02:16:51 +02:00 committed by XhmikosR
parent dd93551914
commit d4e87d28cd
1 changed files with 1 additions and 2 deletions

View File

@ -301,8 +301,7 @@ class Carousel extends BaseComponent {
const isNext = order === ORDER_NEXT
const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap)
if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
this._isSliding = false
if (nextElement === activeElement) {
return
}