prevent files[index] is undefined errors
This commit is contained in:
parent
9b47830076
commit
2c5de102b2
|
@ -334,7 +334,8 @@ const PhotoFrame = ({
|
||||||
handleSelect(filteredData[index].id, index)(!checked);
|
handleSelect(filteredData[index].id, index)(!checked);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getThumbnail = (files: EnteFile[], index: number) => (
|
const getThumbnail = (files: EnteFile[], index: number) =>
|
||||||
|
files[index] ? (
|
||||||
<PreviewCard
|
<PreviewCard
|
||||||
key={`tile-${files[index].id}-selected-${
|
key={`tile-${files[index].id}-selected-${
|
||||||
selected[files[index].id] ?? false
|
selected[files[index].id] ?? false
|
||||||
|
@ -357,6 +358,8 @@ const PhotoFrame = ({
|
||||||
(index >= currentHover && index <= rangeStart)
|
(index >= currentHover && index <= rangeStart)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
);
|
);
|
||||||
|
|
||||||
const getSlideData = async (
|
const getSlideData = async (
|
||||||
|
|
|
@ -439,7 +439,7 @@ export function PhotoList({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (!timeStampList) {
|
if (!timeStampList?.length) {
|
||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue