Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

use getElementsByClassName method for minor perf improvement

Ed Plato9c3fe98a738e
diff --git a/web/js/components/timeline/timeline-controls/axis-timescale-change.js b/web/js/components/timeline/timeline-controls/axis-timescale-change.js
index 50af687ce..467cc6d99 100644
--- a/web/js/components/timeline/timeline-controls/axis-timescale-change.js
+++ b/web/js/components/timeline/timeline-controls/axis-timescale-change.js
@@ -44,8 +44,8 @@ class AxisTimeScaleChange extends PureComponent {
// Toggle visibility of map scales
disableMapScales = (disable) => {
- const imperialMapScale = document.querySelectorAll('.wv-map-scale-imperial');
- const metricMapScale = document.querySelectorAll('.wv-map-scale-metric');
+ const imperialMapScale = document.getElementsByClassName('wv-map-scale-imperial');
+ const metricMapScale = document.getElementsByClassName('wv-map-scale-metric');
if (disable) {
for (const el of imperialMapScale) {
el.style.display = 'none';