Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2022-03-10 01:38:17 +0300
committerXhmikosR <xhmikosr@gmail.com>2022-03-10 16:22:14 +0300
commit88da704eedc5149b70dcec7845453456a6e26761 (patch)
tree3ffdce0b721c7b1440611037843cfc3f700190a8 /js/src/carousel.js
parent28f150d7204788114e2b36555f5e07eb8bdfdbab (diff)
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 37ebde3fcc..70c5fd286a 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
}