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:
authorXhmikosR <xhmikosr@gmail.com>2021-02-16 11:14:05 +0300
committerGitHub <noreply@github.com>2021-02-16 11:14:05 +0300
commit92434fa30f38178ba6fd8f3a7d66828eec0783e0 (patch)
treeaa15308033b6f15dbb095f5445022c9c599e4910 /js/src/tooltip.js
parent3602828a9001298fcfb6638041fc300f9e677bcb (diff)
util: change `isRTL` to a function (#32446)
This allows the bundler to tree-shake the function.
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r--js/src/tooltip.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index c0f8b7c1e8..d35b5e0ab1 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -64,9 +64,9 @@ const DefaultType = {
const AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
- RIGHT: isRTL ? 'left' : 'right',
+ RIGHT: isRTL() ? 'left' : 'right',
BOTTOM: 'bottom',
- LEFT: isRTL ? 'right' : 'left'
+ LEFT: isRTL() ? 'right' : 'left'
}
const Default = {
@@ -563,8 +563,7 @@ class Tooltip extends BaseComponent {
triggers.forEach(trigger => {
if (trigger === 'click') {
- EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)
- )
+ EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event))
} else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ?
this.constructor.Event.MOUSEENTER :