From 0a23862330729ca2b3e11a9b5aa01c83e4ecf455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 27 Jun 2023 10:46:12 +0200 Subject: [PATCH] fix(files): Only render the menu if there are actions to show MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/js/fileactions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 7e3a0b9f40b48..e7994291f38f9 100644 --- a/apps/files/js/fileactions.js +++ b/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) {