Skip to content

Commit eed8ba5

Browse files
authored
fix portal container assignment from context (#6294)
1 parent e1f3c14 commit eed8ba5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/@react-spectrum/overlays/src/Overlay.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ function Overlay(props: OverlayProps, ref: DOMRef<HTMLDivElement>) {
3333
} = props;
3434

3535
let {getContainer} = useUNSTABLE_PortalContext();
36-
container = container || getContainer?.();
36+
if (!container && getContainer) {
37+
container = getContainer();
38+
}
3739

3840
let [exited, setExited] = useState(!isOpen);
3941

0 commit comments

Comments
 (0)