1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-27 05:49:07 +02:00

util: change isRTL to a function (#32446)

This allows the bundler to tree-shake the function.
This commit is contained in:
XhmikosR
2021-02-16 10:14:05 +02:00
committed by GitHub
parent 3602828a90
commit 92434fa30f
5 changed files with 17 additions and 19 deletions

View File

@@ -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()