Skip to content

Commit

Permalink
fix(Utils): fix usePortal issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 5, 2024
1 parent 3ccd98c commit 281d6e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/utils/src/usePortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const usePortal = () => {
const [container] = useState<HTMLDivElement>(() => document.createElement('div'));
const Portal = useCallback(
function Portal({ children }: PropsWithChildren) {
if (!children) return null;
return createPortal(children, container);
},
[container],
Expand Down

0 comments on commit 281d6e9

Please sign in to comment.