mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Constrain the container type of createPortal (#24496)
We already constrained the type of createRoot (can't take document) and hydrateRoot (can't take fragments).
This commit is contained in:
committed by
GitHub
parent
c12891bd2f
commit
f7477b5a02
+1
-1
@@ -107,7 +107,7 @@ setBatchingImplementation(
|
||||
|
||||
function createPortal(
|
||||
children: ReactNodeList,
|
||||
container: Container,
|
||||
container: Element | DocumentFragment,
|
||||
key: ?string = null,
|
||||
): React$Portal {
|
||||
if (!isValidContainer(container)) {
|
||||
|
||||
Reference in New Issue
Block a user