Skip to content

Commit

Permalink
Merge pull request #39080 from nextcloud/backport/39025/stable26
Browse files Browse the repository at this point in the history
[stable26] fix(files): Only render the menu if there are actions to show
  • Loading branch information
susnux authored Jul 1, 2023
2 parents adeeb32 + 5f0de0b commit ecb4f42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files/js/fileactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ecb4f42

Please sign in to comment.