fix: return orignal if size not available
Some checks are pending
Deploy / deploy (push) Waiting to run

This commit is contained in:
Benno Tielen 2026-03-20 01:07:58 +01:00
parent ed273454a3
commit f3dc368500

View file

@ -52,6 +52,14 @@ export const getPhoto = (size: Size, data: OptionalMedia): StaticImageData | und
const sizeData = data.sizes[size] const sizeData = data.sizes[size]
if (!sizeData) { if (!sizeData) {
// return original
if (data.url && data.width && data.height)
return {
src: data.url,
width: data.width,
height: data.height
};
return undefined; return undefined;
} }