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
  • Loading branch information
rohitwaghchaure committed Nov 13, 2024
1 parent 44832c3 commit ed20ceb
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 @@ -72,7 +72,7 @@ frappe.ui.form.on("Job Card", {
let has_items = frm.doc.items && frm.doc.items.length;
frm.trigger("make_fields_read_only");

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 ed20ceb

Please sign in to comment.