@indico-data/design-system 2.21.1 → 2.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indico-data/design-system",
3
- "version": "2.21.1",
3
+ "version": "2.21.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "lib/index.js",
@@ -51,8 +51,11 @@ export function ModalBase(props: ModalBaseProps) {
51
51
  }
52
52
 
53
53
  // Try to render modal within the theme-root, otherwise attach to the root
54
- const parentSelector = () =>
55
- document.getElementById('theme-root') || document.getElementById('root');
54
+ const parentSelector = () => {
55
+ const themeRoot = document.getElementById('theme-root');
56
+ const root = document.getElementById('root');
57
+ return themeRoot || root || document.body;
58
+ };
56
59
 
57
60
  return (
58
61
  <StyledModalBase