fix: type error

This commit is contained in:
Methapon2001 2023-11-30 09:50:49 +07:00
parent 75cddb35d9
commit 6e0b3e378a
No known key found for this signature in database
GPG key ID: 849924FEF46BD132

View file

@ -127,12 +127,10 @@ export const useFileInfoStore = defineStore('info', () => {
}
function getType(mimeType: string | undefined): string {
if (mimeType === undefined) {
return 'unknown type'
}
if (mimeFileMapping.hasOwnProperty(mimeType)) {
if (!!mimeType && mimeFileMapping.hasOwnProperty(mimeType)) {
return mimeFileMapping[mimeType].type
}
return 'unknown type'
}
function getFormatDate(dateTime: string | undefined): string {