Merge pull request #34548 from akhilnarang/dont-show-empty-menu

fix: don't show empty menu in form view
This commit is contained in:
Akhil Narang 2025-10-31 16:48:55 +05:30 committed by GitHub
commit 5b21c0a43e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,7 +26,11 @@ frappe.ui.form.Toolbar = class Toolbar {
this.page.hide_menu();
this.print_icon && this.print_icon.addClass("hide");
} else {
this.page.show_menu();
if (this.page.menu.children().length > 0) {
this.page.show_menu();
} else {
this.page.hide_menu();
}
this.print_icon && this.print_icon.removeClass("hide");
}
}