We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69e2605 commit df33e2bCopy full SHA for df33e2b
src/utils/media-file.js
@@ -1,9 +1,8 @@
1
import { IMAGE_TYPES, VIDEO_TYPES, AUDIO_TYPES } from './constants'
2
3
function checkMediaType(types, file) {
4
- if (!file) return
5
- const { type } = file
6
- return types.some(t => type.toLowerCase().includes(t))
+ if (!file || !file.type) return
+ return types.some(t => file.type.toLowerCase().includes(t))
7
}
8
9
export function isImageFile(file) {
0 commit comments