Skip to content

Commit

Permalink
small adjustments when searching the handler in openFile()
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
  • Loading branch information
Julien Veyssier authored and Raul committed Jul 25, 2022
1 parent d2bacbd commit 650b5d3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ export default {
let handler
// Try provided handler, if any
if (overrideHandlerId !== null) {
const overrideHandler = Object.values(this.registeredHandlers).find((handler) => {
return handler.id === overrideHandlerId
})
const overrideHandler = Object.values(this.registeredHandlers).find(h => h.id === overrideHandlerId)
handler = overrideHandler ?? handler
}
// If no provided handler, or provided handler not found: try a supported handler with mime/mime-alias
Expand Down

0 comments on commit 650b5d3

Please sign in to comment.