mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 05:19:15 +02:00
Refactor: move disposing properties into the base class (#33740)
Moves more functionality to `base-component`, transferring the responsibility of disposal to parent class. Each component, dusting disposal, sets its protected properties to `null`. So the same can be done in one place for all children components .
This commit is contained in:
@@ -219,17 +219,10 @@ class Tooltip extends BaseComponent {
|
||||
this.tip.parentNode.removeChild(this.tip)
|
||||
}
|
||||
|
||||
this._isEnabled = null
|
||||
this._timeout = null
|
||||
this._hoverState = null
|
||||
this._activeTrigger = null
|
||||
if (this._popper) {
|
||||
this._popper.destroy()
|
||||
}
|
||||
|
||||
this._popper = null
|
||||
this.config = null
|
||||
this.tip = null
|
||||
super.dispose()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user