Skip to content

Commit

Permalink
Skip editors route check on empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed May 10, 2021
1 parent 347bb57 commit 5108589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/bugfix-editors-for-all-routes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Editors for all routes

If an extension doesn't define valid routes it should be allowed for all routes by default. That behaviour was not working properly and is fixed now.

https://github.com/owncloud/web/pull/5095
2 changes: 1 addition & 1 deletion packages/web-app-files/src/mixins/fileActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
icon: this.apps.meta[editor.app].icon,
handler: item => this.$_fileActions_openEditor(editor, item.path, item.id),
isEnabled: ({ resource }) => {
if (editor.routes && !checkRoute(editor.routes, this.$route.name)) {
if (editor.routes?.length > 0 && !checkRoute(editor.routes, this.$route.name)) {
return false
}

Expand Down

0 comments on commit 5108589

Please sign in to comment.