Skip to content

Commit

Permalink
fix: Cannot read properties of undefined (reading 'work_order_closed') (
Browse files Browse the repository at this point in the history
#44117)

(cherry picked from commit 1383401)
  • Loading branch information
rohitwaghchaure authored and mergify[bot] committed Nov 13, 2024
1 parent b65b57c commit 9ca583c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/manufacturing/doctype/job_card/job_card.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ frappe.ui.form.on("Job Card", {
frappe.flags.resume_job = 0;
let has_items = frm.doc.items && frm.doc.items.length;

if (!frm.is_new() && frm.doc.__onload.work_order_closed) {
if (!frm.is_new() && frm.doc.__onload?.work_order_closed) {
frm.disable_save();
return;
}
Expand Down

0 comments on commit 9ca583c

Please sign in to comment.