mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 05:19:15 +02:00
Carousel: omit redundant checks as we are always transforming the right values
This commit is contained in:
@@ -389,10 +389,6 @@ class Carousel extends BaseComponent {
|
||||
}
|
||||
|
||||
_directionToOrder(direction) {
|
||||
if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {
|
||||
return direction
|
||||
}
|
||||
|
||||
if (isRTL()) {
|
||||
return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT
|
||||
}
|
||||
@@ -401,10 +397,6 @@ class Carousel extends BaseComponent {
|
||||
}
|
||||
|
||||
_orderToDirection(order) {
|
||||
if (![ORDER_NEXT, ORDER_PREV].includes(order)) {
|
||||
return order
|
||||
}
|
||||
|
||||
if (isRTL()) {
|
||||
return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT
|
||||
}
|
||||
|
Reference in New Issue
Block a user