Skip to content

Commit

Permalink
Added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
orangejenny committed Jan 10, 2025
1 parent 1232cb2 commit b4e608c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions corehq/apps/reports/static/reports/js/bootstrap3/tabular.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ hqDefine("reports/js/bootstrap3/tabular", [
// Handle async reports
$(document).on('ajaxSuccess', function (e, xhr, ajaxOptions, data) {
if (!data || !data.slug) {
// This file is imported by inddex/main, which then gets this event handler, which it doesn't need,
// and which errors sometimes (presumably because there are ajax requests happening that aren't the
// same as what this handler expects). Checking for data.slug is pretty innocuous and fixes the issue.
return;
}
var jsOptions = initialPageData.get("js_options");
Expand Down
3 changes: 3 additions & 0 deletions corehq/apps/reports/static/reports/js/bootstrap5/tabular.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ hqDefine("reports/js/bootstrap5/tabular", [
// Handle async reports
$(document).on('ajaxSuccess', function (e, xhr, ajaxOptions, data) {
if (!data || !data.slug) {
// This file is imported by inddex/main, which then gets this event handler, which it doesn't need,
// and which errors sometimes (presumably because there are ajax requests happening that aren't the
// same as what this handler expects). Checking for data.slug is pretty innocuous and fixes the issue.
return;
}
var jsOptions = initialPageData.get("js_options");
Expand Down

0 comments on commit b4e608c

Please sign in to comment.