From 1ea55d97767cdbb2b666c7e8fadfbc959d6ecf6b Mon Sep 17 00:00:00 2001 From: "Sean R. Abraham" Date: Fri, 24 Jan 2025 17:08:29 -0600 Subject: [PATCH] don't show attached FRs for a new incident 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. --- src/ims/element/static/incident.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ims/element/static/incident.js b/src/ims/element/static/incident.js index db0820dbb..ecabb4876 100644 --- a/src/ims/element/static/incident.js +++ b/src/ims/element/static/incident.js @@ -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) {