diff options
| author | XhmikosR <[email protected]> | 2021-02-16 10:14:05 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-16 10:14:05 +0200 |
| commit | 92434fa30f38178ba6fd8f3a7d66828eec0783e0 (patch) | |
| tree | aa15308033b6f15dbb095f5445022c9c599e4910 /js/src/carousel.js | |
| parent | 3602828a9001298fcfb6638041fc300f9e677bcb (diff) | |
| download | bootstrap-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.js | 8 |
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() |
