Skip to content

Commit

Permalink
Constrain the container type of createPortal (#24496)
Browse files Browse the repository at this point in the history
We already constrained the type of createRoot (can't take document) and hydrateRoot (can't take fragments).
  • Loading branch information
sebmarkbage authored May 5, 2022
1 parent 3dc9a8a commit 024a727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-dom/src/client/ReactDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ setBatchingImplementation(

function createPortal(
children: ReactNodeList,
container: Container,
container: Element | DocumentFragment,
key: ?string = null,
): React$Portal {
if (!isValidContainer(container)) {
Expand Down

0 comments on commit 024a727

Please sign in to comment.