Merge pull request #39080 from nextcloud/backport/39025/stable26

[stable26] fix(files): Only render the menu if there are actions to show
This commit is contained in:
Ferdinand Thiessen 2023-07-01 20:57:17 +02:00 committed by GitHub
commit ecb4f42886
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {