File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,13 @@ const UpdatedDatasetDetailPage: React.FC = () => {
276276 const [ isPreviewLoading , setIsPreviewLoading ] = useState ( false ) ;
277277 const [ copiedKey , setCopiedKey ] = useState < string | null > ( null ) ;
278278 const copyTimer = useRef < number | null > ( null ) ;
279- const aiSummary = datasetDocument ?. [ ".datainfo" ] ?. AISummary ?? "" ;
279+ // const aiSummary = datasetDocument?.[".datainfo"]?.AISummary ?? "";
280+ const rawSummary = datasetDocument ?. [ ".datainfo" ] ?. AISummary ;
281+ const aiSummary : string = ! rawSummary
282+ ? ""
283+ : typeof rawSummary === "string"
284+ ? rawSummary
285+ : Object . values ( rawSummary ) . filter ( Boolean ) . join ( "\n\n" ) ;
280286 const readme = datasetDocument ?. [ "README" ] ?? "" ;
281287 const handleSelectRevision = ( newRev ?: string | null ) => {
282288 setSearchParams ( ( prev ) => {
You can’t perform that action at this time.
0 commit comments