fix(dev): developer_mode could be a boolean (#26631)

This commit is contained in:
Corentin Flr 2024-06-01 08:56:16 +02:00 committed by GitHub
parent 7673397734
commit c770c8e216
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -550,7 +550,7 @@ frappe.ui.form.Toolbar = class Toolbar {
}
if (frappe.model.can_create("DocType")) {
if (frappe.boot.developer_mode === 1 && !is_doctype_form) {
if (frappe.boot.developer_mode && !is_doctype_form) {
// edit doctype
this.page.add_menu_item(
__("Edit DocType"),

View file

@ -1730,7 +1730,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
shortcut: "Ctrl+K",
});
if (frappe.user.has_role("System Manager") && frappe.boot.developer_mode === 1) {
if (frappe.user.has_role("System Manager") && frappe.boot.developer_mode) {
// edit doctype
items.push({
label: __("Edit DocType", null, "Button in list view menu"),