Skip to content

Commit

Permalink
fix(grid): ensure that doc itself is not null
Browse files Browse the repository at this point in the history
Follow up to #25800

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
  • Loading branch information
akhilnarang committed Apr 22, 2024
1 parent 03de739 commit 0838eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/form/grid.js
Expand Up @@ -795,7 +795,7 @@ export default class Grid {
}

set_value(fieldname, value, doc) {
if (this.display_status !== "None" && doc.name && this.grid_rows_by_docname[doc.name]) {
if (this.display_status !== "None" && doc?.name && this.grid_rows_by_docname[doc.name]) {
this.grid_rows_by_docname[doc.name].refresh_field(fieldname, value);
}
}
Expand Down

0 comments on commit 0838eec

Please sign in to comment.