original might be undefined??

This commit is contained in:
Lim Chee Aun 2023-02-23 17:01:33 +08:00
parent e6d6adb480
commit eb896dc5a5

View file

@ -16,7 +16,7 @@ audio = Audio track
function Media({ media, showOriginal, autoAnimate, onClick = () => {} }) {
const { blurhash, description, meta, previewUrl, remoteUrl, url, type } =
media;
const { original, small, focus } = meta || {};
const { original = {}, small, focus } = meta || {};
const width = showOriginal ? original?.width : small?.width;
const height = showOriginal ? original?.height : small?.height;