Skip to content

Commit 8ed353a

Browse files
committed
chore: mock getContainer is optional
1 parent 50e1605 commit 8ed353a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mock.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { generateTrigger } from './index';
33

44
interface MockPortalProps {
55
children: React.ReactElement;
6-
getContainer: () => HTMLElement;
6+
getContainer?: () => HTMLElement;
77
}
88

99
const MockPortal: React.FC<MockPortalProps> = ({
1010
children,
1111
getContainer,
1212
}) => {
1313
React.useEffect(() => {
14-
getContainer();
14+
getContainer?.();
1515
});
1616

1717
return children;

0 commit comments

Comments
 (0)