diff --git a/web-ui/src/pages/PulsePage.jsx b/web-ui/src/pages/PulsePage.jsx index 3690410e2..e9a247c1c 100644 --- a/web-ui/src/pages/PulsePage.jsx +++ b/web-ui/src/pages/PulsePage.jsx @@ -84,7 +84,7 @@ const PulsePage = () => { const myId = currentUser?.id; const data = { externalFeelings: externalComment, - externalScore: externalScore + 1, // converts to 1-based + externalScore: externalScore == null ? null : externalScore + 1, // converts to 1-based internalFeelings: internalComment, internalScore: internalScore + 1, // converts to 1-based submissionDate: today, diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index 4a4a9a9a3..73355b17f 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -197,7 +197,9 @@ const PulseReportPage = () => { } frequencies[internalScore - 1].internal++; - frequencies[externalScore - 1].external++; + if (externalScore != null) { + frequencies[externalScore - 1].external++; + } let memberIdToUse; if (memberId) { @@ -256,7 +258,9 @@ const PulseReportPage = () => { ]; for(let day of scoreChartDataPoints) { day.datapoints.forEach(datapoint => { - externalPieCounts[datapoint.externalScore - 1].value++; + if (datapoint.externalScore != null) { + externalPieCounts[datapoint.externalScore - 1].value++; + } }); } // Filter out data with a zero value so that the pie chart does not attempt