diff --git a/src/Preview.tsx b/src/Preview.tsx index 0b9fcbbd..92ef3cd7 100644 --- a/src/Preview.tsx +++ b/src/Preview.tsx @@ -55,7 +55,7 @@ const Preview: React.FC = props => { const currentPreviewIndex = previewUrlsKeys.indexOf(current); const combinationSrc = isPreviewGroup ? previewUrls.get(current) : src; const showLeftOrRightSwitches = isPreviewGroup && previewGroupCount > 1; - const [lastWheelZoomDirection, setLastWheelZoomDirection] = React.useState({}); + const [lastWheelZoomDirection, setLastWheelZoomDirection] = React.useState({ wheelDirection: 0 }); const onAfterClose = () => { setScale(1);