Skip to content

Commit f81111e

Browse files
committed
Format zoomable image component
1 parent 69fc975 commit f81111e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

frontend/src/components/Media/ZoomableImage.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,12 @@ export const ZoomableImage = forwardRef<ZoomableImageRef, ZoomableImageProps>(
262262
const transform = transformRef.current;
263263
const contentElement = transform?.instance?.contentComponent;
264264
const viewportElement = getViewportElement();
265-
if (!transform || !contentElement || !viewportElement || !imageRef.current)
265+
if (
266+
!transform ||
267+
!contentElement ||
268+
!viewportElement ||
269+
!imageRef.current
270+
)
266271
return false;
267272

268273
const wrapperRect = viewportElement.getBoundingClientRect();

0 commit comments

Comments
 (0)