Merge branch 'phatt' into development
This commit is contained in:
commit
2c90d99338
1 changed files with 7 additions and 2 deletions
|
|
@ -15,7 +15,10 @@ function getIcon(mimeType: string | undefined, fileName: string | undefined) {
|
|||
|
||||
const extension = mime.getExtension(mimeType)
|
||||
|
||||
if (extension) return mimeFileMapping[mimeType].icon
|
||||
if (extension && mimeFileMapping[mimeType]) {
|
||||
return mimeFileMapping[mimeType].icon
|
||||
}
|
||||
|
||||
if (fileName && fileName.includes('.')) return 'mdi-file-outline'
|
||||
|
||||
return 'mdi-file-question-outline'
|
||||
|
|
@ -26,7 +29,9 @@ function getColor(mimeType: string | undefined, fileName: string | undefined) {
|
|||
|
||||
const extension = mime.getExtension(mimeType)
|
||||
|
||||
if (extension) return mimeFileMapping[mimeType].color
|
||||
if (extension && mimeFileMapping[mimeType]) {
|
||||
return mimeFileMapping[mimeType].color
|
||||
}
|
||||
if (fileName && fileName.includes('.')) return 'blue-11'
|
||||
|
||||
return 'grey-5'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue