File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ const PulsePage = () => {
8484 const myId = currentUser ?. id ;
8585 const data = {
8686 externalFeelings : externalComment ,
87- externalScore : externalScore + 1 , // converts to 1-based
87+ externalScore : externalScore == null ? null : externalScore + 1 , // converts to 1-based
8888 internalFeelings : internalComment ,
8989 internalScore : internalScore + 1 , // converts to 1-based
9090 submissionDate : today ,
Original file line number Diff line number Diff line change @@ -197,7 +197,9 @@ const PulseReportPage = () => {
197197 }
198198
199199 frequencies [ internalScore - 1 ] . internal ++ ;
200- frequencies [ externalScore - 1 ] . external ++ ;
200+ if ( externalScore != null ) {
201+ frequencies [ externalScore - 1 ] . external ++ ;
202+ }
201203
202204 let memberIdToUse ;
203205 if ( memberId ) {
@@ -256,7 +258,9 @@ const PulseReportPage = () => {
256258 ] ;
257259 for ( let day of scoreChartDataPoints ) {
258260 day . datapoints . forEach ( datapoint => {
259- externalPieCounts [ datapoint . externalScore - 1 ] . value ++ ;
261+ if ( datapoint . externalScore != null ) {
262+ externalPieCounts [ datapoint . externalScore - 1 ] . value ++ ;
263+ }
260264 } ) ;
261265 }
262266 // Filter out data with a zero value so that the pie chart does not attempt
You can’t perform that action at this time.
0 commit comments