aboutsummaryrefslogtreecommitdiff
path: root/js/src/tooltip.js
diff options
context:
space:
mode:
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 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() {