mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 18:40:03 +00:00
Use getOrCreateInstance
on _initializeOnDelegatedTarget
This commit is contained in:
parent
92c7056619
commit
3716603dbc
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user