We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e55ff57 commit c934762Copy full SHA for c934762
src/lib/portal-root.ts
@@ -10,9 +10,12 @@ let root
10
// <DialogPrimitive.Portal container={portalRoot} {...props} />
11
// )
12
if (typeof document !== "undefined") {
13
- root = document.createElement("div")
+ const id = "react-redis-browser-portal-root"
14
+
15
+ root = document.querySelector(`#${id}`) ?? document.createElement("div")
16
17
root.classList.add("ups-db")
18
+ root.id = "react-redis-browser-portal-root"
19
20
document.body.append(root)
21
}
0 commit comments