Skip to content

Commit

Permalink
fix(files): Only render the menu if there are actions to show
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr authored and susnux committed Jul 1, 2023
1 parent adeeb32 commit 5f0de0b
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 5f0de0b

Please sign in to comment.