diff --git a/packages/react-photo-view/package.json b/packages/react-photo-view/package.json index 3e1aebb..46c907d 100644 --- a/packages/react-photo-view/package.json +++ b/packages/react-photo-view/package.json @@ -1,6 +1,6 @@ { "name": "react-photo-view", - "version": "1.1.0", + "version": "1.1.1", "description": "An exquisite React photo preview component", "author": "MinJieLiu", "license": "Apache-2.0", diff --git a/packages/react-photo-view/src/PhotoSlider.tsx b/packages/react-photo-view/src/PhotoSlider.tsx index d894590..174cd9e 100644 --- a/packages/react-photo-view/src/PhotoSlider.tsx +++ b/packages/react-photo-view/src/PhotoSlider.tsx @@ -333,7 +333,7 @@ export default function PhotoSlider(props: IPhotoSliderProps) { onClose: close, onIndexChange: changeIndex, overlayVisible: currentOverlayVisible, - overlay: currentImage.overlay, + overlay: currentImage && currentImage.overlay, scale, rotate, onScale,