From 741fa589d027c2d16bff844e45a08c842f5f7e04 Mon Sep 17 00:00:00 2001 From: Nagarjun Bodduna Date: Mon, 10 May 2021 23:47:53 +0530 Subject: 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 --- js/src/util/backdrop.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/src') diff --git a/js/src/util/backdrop.js b/js/src/util/backdrop.js index 775c09ec0..ad9fcb92f 100644 --- a/js/src/util/backdrop.js +++ b/js/src/util/backdrop.js @@ -89,6 +89,8 @@ class Backdrop { ...Default, ...(typeof config === 'object' ? config : {}) } + + config.rootElement = config.rootElement || document.body typeCheckConfig(NAME, config, DefaultType) return config } -- cgit v1.2.3