Skip to content

Commit

Permalink
fix(grid): don't crash if row doesn't exist
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
(cherry picked from commit 31c6df2)
  • Loading branch information
akhilnarang authored and mergify[bot] committed Apr 3, 2024
1 parent 4608097 commit db85d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/form/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default class Grid {
this.df.data = this.get_data();
this.df.data = this.df.data.filter((row) => row.idx != doc.idx);
}
this.grid_rows_by_docname[doc.name].remove();
this.grid_rows_by_docname[doc.name]?.remove();
dirty = true;
});
tasks.push(() => frappe.timeout(0.1));
Expand Down

0 comments on commit db85d3c

Please sign in to comment.