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:
authorGeoSot <geo.sotis@gmail.com>2021-06-10 10:53:59 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-07-22 17:20:38 +0300
commit3716603dbc3dc1b612c4ef6c83860195312f2532 (patch)
treea4a9d74c5de53103b1eb7c4e8a482bdbc8fcb0b3 /js/src/tooltip.js
parent92c7056619293a581626c37ef2c0095c6f1abceb (diff)
Use `getOrCreateInstance` on `_initializeOnDelegatedTarget`
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r--js/src/tooltip.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index d69a80e275..6dc7a0350d 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() {