Skip to content

Commit

Permalink
fix: update property if field exist
Browse files Browse the repository at this point in the history
(cherry picked from commit 66df0e9)
(cherry picked from commit 8171c65)
  • Loading branch information
shariquerik authored and mergify[bot] committed Apr 12, 2023
1 parent 809f58e commit 58fc23d
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 58fc23d

Please sign in to comment.