2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-15 11:59:39 +03:00

Use getOrCreateInstance on _initializeOnDelegatedTarget

This commit is contained in:
GeoSot
2021-06-10 10:53:59 +03:00
committed by XhmikosR
parent 92c7056619
commit 3716603dbc
+1 -9
View File
@@ -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() {