Fix issue where ui could break if caption is read as a non string.

This commit is contained in:
Jaret Burkett
2025-12-23 09:47:19 -07:00
parent 87edca1b2b
commit 9883055684

View File

@@ -37,7 +37,10 @@ const DatasetImageCard: React.FC<DatasetImageCardProps> = ({
.then(res => res.data)
.then(data => {
console.log('Caption fetched:', data);
if (data){
// fix issue where caption could be non string
data = `${data}`
}
setCaption(data || '');
setSavedCaption(data || '');
setIsCaptionLoaded(true);