Skip to content

Commit

Permalink
don't show attached FRs for a new incident
Browse files Browse the repository at this point in the history
fixing a silly bug I introduced yesterday, in which a new incident was
showing as having a bunch of FRs attached to it. That's because I was
checking if "fr.incident === incidentNumber" for each of those FRs, and
it turns out that null == null, so we showed all those FRs that weren't
attached to any incident yet.
  • Loading branch information
srabraham committed Jan 24, 2025
1 parent 31385a6 commit 1ea55d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ims/element/static/incident.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ function loadFieldReport(fieldReportNumber, success) {
let attachedFieldReports = null;

function loadAttachedFieldReports() {
if (incidentNumber == null) {
return;
}
_attachedFieldReports = [];
for (const fr of allFieldReports) {
if (fr.incident === incidentNumber) {
Expand Down

0 comments on commit 1ea55d9

Please sign in to comment.