fix: return orignal if size not available
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
This commit is contained in:
parent
f3dc368500
commit
3148231cc8
1 changed files with 8 additions and 0 deletions
|
|
@ -71,6 +71,14 @@ export const getPhoto = (size: Size, data: OptionalMedia): StaticImageData | und
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return original
|
||||||
|
if (data.url && data.width && data.height)
|
||||||
|
return {
|
||||||
|
src: data.url,
|
||||||
|
width: data.width,
|
||||||
|
height: data.height
|
||||||
|
};
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue