Merge pull request #25778 from akhilnarang/fix-grid-row-removal-crash

fix(grid): don't crash if row doesn't exist
This commit is contained in:
Akhil Narang 2024-04-03 14:03:29 +05:30 committed by GitHub
commit 45934f5dfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -236,7 +236,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));