Skip to content

Commit

Permalink
🐛 fix: fix pdf preview with capital ext (lobehub#5074)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Dec 18, 2024
1 parent 470c186 commit 3f9470f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/FileViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface FileViewerProps extends FileListItem {
}

const FileViewer = memo<FileViewerProps>(({ id, style, fileType, url, name }) => {
if (fileType === 'pdf' || name.endsWith('.pdf')) {
if (fileType?.toLowerCase() === 'pdf' || name?.toLowerCase().endsWith('.pdf')) {
return <PDFRenderer fileId={id} url={url} />;
}

Expand Down

0 comments on commit 3f9470f

Please sign in to comment.