Interactive interface for browsing global, full-resolution satellite imagery
clean up variable order/declaration and comments
Edward Plato8bbbc2e94366
diff --git a/web/js/components/layer/measurement-row.js b/web/js/components/layer/measurement-row.jsindex f698c2a30..e90046054 100644--- a/web/js/components/layer/measurement-row.js+++ b/web/js/components/layer/measurement-row.js@@ -266,7 +266,7 @@ class LayerRow extends React.Component {const { activeSourceIndex } = this.state;const sources = lodashValues(measurement.sources);- // handle low empty activeSourceIndex values on projection change+ // handle activeSourceIndex values not valid after projection changelet validIndexSelected = false;let minValidIndex = -1;@@ -279,21 +279,21 @@ class LayerRow extends React.Component {let hasSetting = hasMeasurementSetting(measurement, source);if (hasSetting) {+ // check if activeSourceIndex is satisfied to set flag+ if (activeSourceIndex === index) {+ validIndexSelected = true;+ }// only set minValidIndex onceif (minValidIndex < 0) {minValidIndex = index;}- // check if activeSourceIndex is satisfied- if (activeSourceIndex === index) {- validIndexSelected = true;- }}return [source, hasSetting];}).map((sourceCheckResults, index) => {- let [source, hasSetting] = sourceCheckResults;+ const [source, hasSetting] = sourceCheckResults;if (hasSetting) {// if activeSourceIndex does not match any valid indexes, make minValidIndex active tab