Skip to content

Commit 33083e1

Browse files
fix(@clayui/modal): render children only when modal is visible
Prevent breaking components that are trying to get some information from the DOM when they are rendered inside Modal.
1 parent c98a36e commit 33083e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/clay-modal/src/Modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const ClayModal: FunctionComponent<IProps> & {
8484
status,
8585
}}
8686
>
87-
{children}
87+
{observer.mutation && children}
8888
</Context.Provider>
8989
</div>
9090
</div>

0 commit comments

Comments
 (0)