Merge pull request #31204 from sokumon/breadcrumb
fix: check if doc name is string
This commit is contained in:
commit
d4fcdecee4
1 changed files with 4 additions and 2 deletions
|
|
@ -656,8 +656,10 @@ $.extend(frappe.model, {
|
|||
},
|
||||
|
||||
get_doc_title(doc) {
|
||||
if (doc.name.startsWith("new-" + doc.doctype.toLowerCase().replace(/ /g, "-"))) {
|
||||
return __("New {0}", [__(doc.doctype)]);
|
||||
if (typeof doc.name == "string") {
|
||||
if (doc.name.startsWith("new-" + doc.doctype.toLowerCase().replace(/ /g, "-"))) {
|
||||
return __("New {0}", [__(doc.doctype)]);
|
||||
}
|
||||
}
|
||||
let meta = frappe.get_meta(doc.doctype);
|
||||
if (meta.title_field) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue