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)
|
const isPreviewable = isFileTypePreviewable(file.mimeType)
|
||||||
setIsFilePreviewable(isPreviewable)
|
setIsFilePreviewable(isPreviewable)
|
||||||
|
|
||||||
|
if (!isPreviewable) {
|
||||||
|
setIsLoadingFile(false)
|
||||||
|
}
|
||||||
|
|
||||||
if (!objectUrl && isPreviewable) {
|
if (!objectUrl && isPreviewable) {
|
||||||
getObjectUrl().catch(console.error)
|
getObjectUrl().catch(console.error)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user