aboutsummaryrefslogtreecommitdiff
path: root/js/src/carousel.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-02-16 10:14:05 +0200
committerGitHub <[email protected]>2021-02-16 10:14:05 +0200
commit92434fa30f38178ba6fd8f3a7d66828eec0783e0 (patch)
treeaa15308033b6f15dbb095f5445022c9c599e4910 /js/src/carousel.js
parent3602828a9001298fcfb6638041fc300f9e677bcb (diff)
downloadbootstrap-92434fa30f38178ba6fd8f3a7d66828eec0783e0.tar.xz
bootstrap-92434fa30f38178ba6fd8f3a7d66828eec0783e0.zip
util: change `isRTL` to a function (#32446)
This allows the bundler to tree-shake the function.
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 17814d42d..75f8a4da7 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -253,7 +253,7 @@ class Carousel extends BaseComponent {
// swipe left
if (direction > 0) {
- if (isRTL) {
+ if (isRTL()) {
this.next()
} else {
this.prev()
@@ -262,7 +262,7 @@ class Carousel extends BaseComponent {
// swipe right
if (direction < 0) {
- if (isRTL) {
+ if (isRTL()) {
this.prev()
} else {
this.next()
@@ -350,14 +350,14 @@ class Carousel extends BaseComponent {
if (event.key === ARROW_LEFT_KEY) {
event.preventDefault()
- if (isRTL) {
+ if (isRTL()) {
this.next()
} else {
this.prev()
}
} else if (event.key === ARROW_RIGHT_KEY) {
event.preventDefault()
- if (isRTL) {
+ if (isRTL()) {
this.prev()
} else {
this.next()