fix: space and semicolon

This commit is contained in:
Jannat Patel 2021-11-24 20:11:29 +05:30
parent 7cc6da2122
commit 5b9c4e5781
2 changed files with 4 additions and 4 deletions

View file

@ -20,7 +20,7 @@ frappe.ui.form.on('Form Tour', {
if (issingle) {
route_changed = frappe.set_route('Form', frm.doc.reference_doctype);
} else if(frm.doc.first_document) {
} else if (frm.doc.first_document) {
route_changed = frappe.set_route('Form', frm.doc.reference_doctype, name);
} else {
route_changed = frappe.set_route('Form', frm.doc.reference_doctype, 'new');
@ -130,7 +130,7 @@ async function get_first_document(doctype) {
await frappe.db.get_list(doctype, { order_by: "creation" }).then(res => {
if (Array.isArray(res) && res.length)
docname = res[0].name
docname = res[0].name;
});
return docname || 'new';

View file

@ -567,13 +567,13 @@ export default class OnboardingWidget extends Widget {
}
async get_first_document(doctype) {
const { message } = await frappe.db.get_value('Form Tour', { 'reference_doctype': doctype }, ["first_document"])
const { message } = await frappe.db.get_value('Form Tour', { 'reference_doctype': doctype }, ["first_document"]);
let docname;
if (message.first_document) {
await frappe.db.get_list(doctype, { order_by: "creation" }).then(res => {
if (Array.isArray(res) && res.length)
docname = res[0].name
docname = res[0].name;
});
}