Skip to content

Commit

Permalink
fix: respect mimetype aliases for file previews
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Oct 9, 2024
1 parent 241521a commit 1298b6f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ export default {
const availableHandlers = OCA.Viewer.availableHandlers
for (let i = 0; i < availableHandlers.length; i++) {
if (availableHandlers[i]?.mimes?.includes && availableHandlers[i].mimes.includes(this.file.mimetype)) {
if (availableHandlers[i]?.mimes?.includes(this.file.mimetype)
|| availableHandlers[i]?.mimes?.includes(availableHandlers[i]?.mimesAliases?.[this.file.mimetype])) {
return true
}
}
Expand Down

0 comments on commit 1298b6f

Please sign in to comment.