1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-23 09:41:11 +00: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

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() {