Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
harupy committed Apr 24, 2022
1 parent 8fadd6a commit c385470
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,11 @@ const Preview: React.FC<PreviewProps> = props => {
);

const onDoubleClick: React.MouseEventHandler<HTMLBodyElement> = () => {
if (visible) {
setScale(1);
setPosition(initialPosition);
if (!visible) {
return;
}
setScale(1);
setPosition(initialPosition);
};

useEffect(() => {
Expand Down

0 comments on commit c385470

Please sign in to comment.