]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): Only render the menu if there are actions to show 39025/head
authorJulius Härtl <jus@bitgrid.net>
Tue, 27 Jun 2023 08:46:12 +0000 (10:46 +0200)
committerJulius Härtl <jus@bitgrid.net>
Thu, 29 Jun 2023 18:26:54 +0000 (20:26 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/fileactions.js

index 7e3a0b9f40b483926d5943c3414329f29d72836a..e7994291f38f93baaf7beb56c1bb498cdee76f1e 100644 (file)
                                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) {