Skip to content

Commit

Permalink
fix(query_report): don't crash if undefined
Browse files Browse the repository at this point in the history
Mismerged in #25562

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
  • Loading branch information
akhilnarang committed Apr 2, 2024
1 parent 9025d6d commit 8f2408d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frappe/public/js/frappe/views/reports/query_report.js
Original file line number Diff line number Diff line change
Expand Up @@ -1492,8 +1492,8 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
);
}

const visible_idx = this.datatable.bodyRenderer.visibleRowIndices;
if (visible_idx.length + 1 === this.data.length) {
const visible_idx = this.datatable?.bodyRenderer.visibleRowIndices || [];
if (visible_idx.length + 1 === this.data?.length) {
visible_idx.push(visible_idx.length);
}

Expand Down

0 comments on commit 8f2408d

Please sign in to comment.