fix: spinner loading infinitely on unsupported file types (#1002)
This commit is contained in:
@@ -50,6 +50,10 @@ export const FilePreviewModal: FunctionComponent<Props> = ({ application, file,
|
||||
const isPreviewable = isFileTypePreviewable(file.mimeType)
|
||||
setIsFilePreviewable(isPreviewable)
|
||||
|
||||
if (!isPreviewable) {
|
||||
setIsLoadingFile(false)
|
||||
}
|
||||
|
||||
if (!objectUrl && isPreviewable) {
|
||||
getObjectUrl().catch(console.error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user