Skip to content

Commit d08ea9e

Browse files
authored
fix(test): update mousePosition check (#426)
1 parent 7b76d8d commit d08ea9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Dialog/Content/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const Content = React.forwardRef<ContentRef, ContentProps>((props, ref) => {
4141
const elementOffset = offset(dialogRef.current);
4242

4343
setTransformOrigin(
44-
mousePosition
44+
(mousePosition?.x && mousePosition?.y)
4545
? `${mousePosition.x - elementOffset.left}px ${mousePosition.y - elementOffset.top}px`
4646
: '',
4747
);

0 commit comments

Comments
 (0)