From 27306b9bcc33bf50deaa25a4eeb6c42b835038fd Mon Sep 17 00:00:00 2001 From: harupy Date: Wed, 27 Apr 2022 11:10:28 +0900 Subject: [PATCH] fix coverage --- src/Preview.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Preview.tsx b/src/Preview.tsx index 17cebead..e613c7ba 100644 --- a/src/Preview.tsx +++ b/src/Preview.tsx @@ -230,11 +230,10 @@ const Preview: React.FC = props => { ); const onDoubleClick = () => { - if (!visible) { - return; + if (visible) { + setScale(1); + setPosition(initialPosition); } - setScale(1); - setPosition(initialPosition); }; useEffect(() => {