Skip to content

Commit

Permalink
Fix app provider mimetype resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
diocas committed Nov 8, 2021
1 parent 11c0a2f commit 5bf56b2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/web-app-files/src/mixins/fileActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ export default {
return []
}

const { app_providers: appProviders = [] } = this.mimeTypes.find(
(t) => t.mime_type === mimeType
)
const filteredMimeTypes = this.mimeTypes.find((t) => t.mime_type === mimeType)
if (filteredMimeTypes === undefined) {
return []
}
const { app_providers: appProviders = [] } = filteredMimeTypes

return appProviders.map((app) => {
const label = this.$gettext('Open in %{ appName }')
Expand Down

0 comments on commit 5bf56b2

Please sign in to comment.