Skip to content

Commit

Permalink
Merge pull request #20672 from frappe/mergify/bp/version-13/pr-20659
Browse files Browse the repository at this point in the history
fix: update property if field exist (backport #20658) (backport #20659)
  • Loading branch information
surajshetty3416 committed Apr 12, 2023
2 parents 809f58e + 58fc23d commit f1cee36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frappe/public/js/frappe/form/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,10 @@ export default class Grid {
this.docfields.find(d => d.fieldname === fieldname)[property] = value;

if (this.user_defined_columns && this.user_defined_columns.length > 0) {
this.user_defined_columns.find((d) => d.fieldname === fieldname)[property] = value;
let field = this.user_defined_columns.find((d) => d.fieldname === fieldname);
if (field && Object.keys(field).includes(property)) {
field[property] = value;
}
}

this.debounced_refresh();
Expand Down

0 comments on commit f1cee36

Please sign in to comment.