mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
fix: Resolve error when checking pipeline parsing result (#15778)
### What problem does this PR solve? fix: Resolve error when checking pipeline parsing result ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { memo } from 'react';
|
||||
|
||||
import { Images } from '@/constants/common';
|
||||
import CSVFileViewer from './csv-preview';
|
||||
import { DocPreviewer } from './doc-preview';
|
||||
import { ExcelCsvPreviewer } from './excel-preview';
|
||||
@@ -44,9 +45,7 @@ const DocumentPreview = function ({
|
||||
<TxtPreviewer className={className} url={url} />
|
||||
</section>
|
||||
)}
|
||||
{['jpg', 'png', 'gif', 'jpeg', 'svg', 'bmp', 'ico', 'tif'].indexOf(
|
||||
fileType,
|
||||
) > -1 && (
|
||||
{Images.indexOf(fileType) > -1 && (
|
||||
<section>
|
||||
<ImagePreviewer className={className} url={url} />
|
||||
</section>
|
||||
|
||||
@@ -63,7 +63,7 @@ const DataflowResult = () => {
|
||||
const fileType = useMemo(() => {
|
||||
if (isAgent) {
|
||||
return Images.some((x) => x === documentExtension)
|
||||
? documentInfo?.name.split('.').pop() || 'visual'
|
||||
? documentInfo?.name?.split('.').pop() || documentExtension
|
||||
: documentExtension;
|
||||
}
|
||||
switch (documentInfo?.type) {
|
||||
|
||||
Reference in New Issue
Block a user