mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-01-26 16:39:47 +00:00
Fix issue where ui could break if caption is read as a non string.
This commit is contained in:
@@ -37,7 +37,10 @@ const DatasetImageCard: React.FC<DatasetImageCardProps> = ({
|
|||||||
.then(res => res.data)
|
.then(res => res.data)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log('Caption fetched:', data);
|
console.log('Caption fetched:', data);
|
||||||
|
if (data){
|
||||||
|
// fix issue where caption could be non string
|
||||||
|
data = `${data}`
|
||||||
|
}
|
||||||
setCaption(data || '');
|
setCaption(data || '');
|
||||||
setSavedCaption(data || '');
|
setSavedCaption(data || '');
|
||||||
setIsCaptionLoaded(true);
|
setIsCaptionLoaded(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user