revert: async await in breadcrumbs.js
This commit is contained in:
parent
19bb79215f
commit
31415bb72d
1 changed files with 2 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ frappe.breadcrumbs = {
|
|||
return localStorage["preferred_breadcrumbs:" + doctype];
|
||||
},
|
||||
|
||||
async add(module, doctype, type) {
|
||||
add(module, doctype, type) {
|
||||
let obj;
|
||||
if (typeof module === "object") {
|
||||
obj = module;
|
||||
|
|
@ -40,7 +40,6 @@ frappe.breadcrumbs = {
|
|||
type: type,
|
||||
};
|
||||
}
|
||||
await frappe.model.with_doctype(doctype);
|
||||
this.all[frappe.breadcrumbs.current_page()] = obj;
|
||||
this.update();
|
||||
},
|
||||
|
|
@ -185,12 +184,11 @@ frappe.breadcrumbs = {
|
|||
}
|
||||
},
|
||||
|
||||
async rename(doctype, old_name, new_name) {
|
||||
rename(doctype, old_name, new_name) {
|
||||
var old_route_str = ["Form", doctype, old_name].join("/");
|
||||
var new_route_str = ["Form", doctype, new_name].join("/");
|
||||
this.all[new_route_str] = this.all[old_route_str];
|
||||
delete frappe.breadcrumbs.all[old_route_str];
|
||||
await frappe.model.with_doctype(doctype);
|
||||
this.update();
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue