mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-15 11:59:39 +03:00
Fix bug where backdrop calls method on null if it is already removed from the body (#34014)
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
This commit is contained in:
@@ -116,7 +116,11 @@ class Backdrop {
|
||||
|
||||
EventHandler.off(this._element, EVENT_MOUSEDOWN)
|
||||
|
||||
this._getElement().parentNode.removeChild(this._element)
|
||||
const { parentNode } = this._getElement()
|
||||
if (parentNode) {
|
||||
parentNode.removeChild(this._element)
|
||||
}
|
||||
|
||||
this._isAppended = false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user