1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-08 22:56:46 +02:00

Fix backdrop rootElement not initialized in Modal (#33853)

* Initialize default value of rootElement before using

* Remove redundant test | put rootElement tests together

Co-authored-by: GeoSot <geo.sotis@gmail.com>
This commit is contained in:
Nagarjun Bodduna
2021-05-10 23:47:53 +05:30
committed by GitHub
parent 308ffba793
commit 741fa589d0
2 changed files with 45 additions and 29 deletions

View File

@@ -89,6 +89,8 @@ class Backdrop {
...Default,
...(typeof config === 'object' ? config : {})
}
config.rootElement = config.rootElement || document.body
typeCheckConfig(NAME, config, DefaultType)
return config
}