diff --git a/changelog/unreleased/bugfix-editors-for-all-routes b/changelog/unreleased/bugfix-editors-for-all-routes new file mode 100644 index 00000000000..68c3ecd20b1 --- /dev/null +++ b/changelog/unreleased/bugfix-editors-for-all-routes @@ -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 diff --git a/packages/web-app-files/src/mixins/fileActions.js b/packages/web-app-files/src/mixins/fileActions.js index 086be675d0e..197a7c3f4d8 100644 --- a/packages/web-app-files/src/mixins/fileActions.js +++ b/packages/web-app-files/src/mixins/fileActions.js @@ -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 }