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/tooltip.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/tooltip.js')
| -rw-r--r-- | js/src/tooltip.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index c0f8b7c1e..d35b5e0ab 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 : |
