diff --git a/src/ims/element/static/field_report.js b/src/ims/element/static/field_report.js index 6f304a1fd..122242473 100644 --- a/src/ims/element/static/field_report.js +++ b/src/ims/element/static/field_report.js @@ -335,7 +335,7 @@ async function makeIncident() { const attachToIncidentUrl = `${urlReplace(url_fieldReports)}${fieldReport.number}` + `?action=attach;incident=${fieldReport.incident}`; - let {attachErr} = await fetchJsonNoThrow(attachToIncidentUrl, { + const {err: attachErr} = await fetchJsonNoThrow(attachToIncidentUrl, { body: {}, }); if (attachErr != null) { diff --git a/src/ims/element/static/field_reports.js b/src/ims/element/static/field_reports.js index f41c33d9f..cc414eadf 100644 --- a/src/ims/element/static/field_reports.js +++ b/src/ims/element/static/field_reports.js @@ -77,6 +77,7 @@ function initFieldReportsTable() { // Fire-and-forget this promise, since it tries forever to acquire a lock let ignoredPromise = requestEventSourceLock(); + const fieldReportChannel = new BroadcastChannel(fieldReportChannelName); fieldReportChannel.onmessage = function (e) { if (e.data["update_all"]) { diff --git a/src/ims/element/static/incidents.js b/src/ims/element/static/incidents.js index 49b1b6819..1302bd259 100644 --- a/src/ims/element/static/incidents.js +++ b/src/ims/element/static/incidents.js @@ -124,6 +124,7 @@ function initIncidentsTable() { // Fire-and-forget this promise, since it tries forever to acquire a lock let ignoredPromise = requestEventSourceLock(); + const incidentChannel = new BroadcastChannel(incidentChannelName); incidentChannel.onmessage = async function (e) { if (e.data["update_all"]) {