aboutsummaryrefslogtreecommitdiff
path: root/js/src/carousel.js
diff options
context:
space:
mode:
authorGeoSot <[email protected]>2022-03-10 00:38:17 +0200
committerXhmikosR <[email protected]>2022-03-10 15:22:14 +0200
commit88da704eedc5149b70dcec7845453456a6e26761 (patch)
tree3ffdce0b721c7b1440611037843cfc3f700190a8 /js/src/carousel.js
parent28f150d7204788114e2b36555f5e07eb8bdfdbab (diff)
downloadbootstrap-88da704eedc5149b70dcec7845453456a6e26761.tar.xz
bootstrap-88da704eedc5149b70dcec7845453456a6e26761.zip
Carousel: omit redundant checks as we are always transforming the right values
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js8
1 files changed, 0 insertions, 8 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 37ebde3fc..70c5fd286 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -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
}