diff options
| author | GeoSot <[email protected]> | 2021-06-10 10:53:59 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2021-07-22 17:20:38 +0300 |
| commit | 3716603dbc3dc1b612c4ef6c83860195312f2532 (patch) | |
| tree | a4a9d74c5de53103b1eb7c4e8a482bdbc8fcb0b3 /js/src | |
| parent | 92c7056619293a581626c37ef2c0095c6f1abceb (diff) | |
| download | bootstrap-3716603dbc3dc1b612c4ef6c83860195312f2532.tar.xz bootstrap-3716603dbc3dc1b612c4ef6c83860195312f2532.zip | |
Use `getOrCreateInstance` on `_initializeOnDelegatedTarget`
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/tooltip.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index d69a80e27..6dc7a0350 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -439,15 +439,7 @@ class Tooltip extends BaseComponent { // Private _initializeOnDelegatedTarget(event, context) { - const dataKey = this.constructor.DATA_KEY - context = context || Data.get(event.delegateTarget, dataKey) - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()) - Data.set(event.delegateTarget, dataKey, context) - } - - return context + return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()) } _getOffset() { |
