Skip to content

Commit

Permalink
more const bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ajanian committed Sep 30, 2020
1 parent 895bde5 commit 08a90c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions static/render_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function seriesToPlot(stateOrCounty) {
});

if (stateOrCountySel.value && !locationTypeSel.value) {
const fileDataToPlot = _.where(plotData, { [stateOrCounty]: stateOrCountySel.value });
let fileDataToPlot = _.where(plotData, { [stateOrCounty]: stateOrCountySel.value });
if(stateOrCounty == 'state') {
// if we are processing a state pick out the statewide number
fileDataToPlot = _.where(fileDataToPlot, { 'county': 'Statewide' });
Expand Down Expand Up @@ -207,7 +207,7 @@ function seriesToPlot(stateOrCounty) {
resultsWeather = _.clone(results);
}
else if (stateOrCountySel.value && locationTypeSel.value) {
const fileDataToPlot = _.where(plotData, { location_type: locationTypeSel[locationTypeSel.selectedIndex].text, [stateOrCounty]: stateOrCountySel.value });
let fileDataToPlot = _.where(plotData, { location_type: locationTypeSel[locationTypeSel.selectedIndex].text, [stateOrCounty]: stateOrCountySel.value });
if(stateOrCounty == 'state') {
// if we are processing a state pick out the statewide number
fileDataToPlot = _.where(fileDataToPlot, { 'county': 'Statewide' });
Expand Down Expand Up @@ -247,7 +247,7 @@ function sortStatewideFirst(seriesToSort) {
}

function isPlotDataEmpty(seriesForPlot) {
const plotEmpty = true;
let plotEmpty = true;
for(let seriesIndex = 0; seriesIndex < seriesForPlot.length; seriesIndex++){
const series = seriesForPlot[seriesIndex];
const seriesData = series.data;
Expand Down

0 comments on commit 08a90c2

Please sign in to comment.