This commit is contained in:
Claire Chabas
2025-05-22 13:42:37 +02:00
parent 969cfa80fe
commit 929a0cf264
@@ -32,9 +32,6 @@ export function ZoomImage(
return;
}
const imageWidth = typeof width === 'number' ? width : 0;
let viewWidth = 0;
const mediaQueryList = window.matchMedia('(min-width: 768px)');
const resizeObserver =
typeof ResizeObserver !== 'undefined'
@@ -44,7 +41,6 @@ export function ZoomImage(
// Since the image is removed from the DOM when the modal is opened,
// We only care when the size is defined.
if (imgEntry && imgEntry.contentRect.width !== 0) {
viewWidth = entries[0]?.contentRect.width;
setPlaceholderRect(entries[0].contentRect);
onChange();
}