fix(files): Only render the menu if there are actions to show

Signed-off-by: Julius Härtl <jus@bitgrid.net>
pull/39025/head
Julius Härtl 3 years ago
parent 5b7f81b1b5
commit 40b380bb99
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
  1. 4
      apps/files/js/fileactions.js

@ -597,8 +597,8 @@
Object.values = objectValues;
}
var menuActions = Object.values(this.actions.all).filter(function (action) {
return action.type !== OCA.Files.FileActions.TYPE_INLINE;
var menuActions = Object.values(actions).filter(function (action) {
return action.type !== OCA.Files.FileActions.TYPE_INLINE && (!defaultAction || action.name !== defaultAction.name)
});
// do not render the menu if nothing is in it
if (menuActions.length > 0) {

Loading…
Cancel
Save