diff options
author | GeoSot <geo.sotis@gmail.com> | 2021-05-25 18:30:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 18:30:38 +0300 |
commit | 544d9ac3cf5b7a501524c1bab9570f4b46b8e7e4 (patch) | |
tree | 0a1f81f01296d844a0d732983e829b2931214682 /js/src/tooltip.js | |
parent | 69a9b8794506dca2417a79293b2f5d89caa0e4d2 (diff) |
Change `element.parentNode.removeChild(element)` to `element.remove()` (#34071)
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r-- | js/src/tooltip.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 84379c88f2..2eb91965b2 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -208,8 +208,8 @@ class Tooltip extends BaseComponent { EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler) - if (this.tip && this.tip.parentNode) { - this.tip.parentNode.removeChild(this.tip) + if (this.tip) { + this.tip.remove() } if (this._popper) { @@ -314,8 +314,8 @@ class Tooltip extends BaseComponent { return } - if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) { - tip.parentNode.removeChild(tip) + if (this._hoverState !== HOVER_STATE_SHOW) { + tip.remove() } this._cleanTipClass() |