Merge pull request #57903 from SuhasBharadwajK/develop

fix: condition check with empty object for falsy case
This commit is contained in:
Nishka Gosalia
2026-08-09 00:18:36 +05:30
committed by GitHub

View File

@@ -456,7 +456,7 @@ const set_employee_and_company = function (frm) {
const options = { user_id: frappe.session.user };
const fields = ["name", "company"];
frappe.db.get_value("Employee", options, fields).then(({ message }) => {
if (message) {
if (message.name && message.company) {
// there is an employee with the currently logged in user_id
frm.set_value("employee", message.name);
frm.set_value("company", message.company);