Describe the bug
If you click the Historic button and then press the Current button quickly before the layer can load, the layer gets duplicated in the legend (one copy never loads), and the Update map, Clear map, Historic, and Share map buttons get stuck disabled.
To Reproduce
Steps to reproduce the behavior (TIP: Provide a direct URL using the "Share" button above the map):
Describe the bug If you click the
Historic
button and then press theCurrent
button quickly before the layer can load, the layer gets duplicated in the legend (one copy never loads), and theUpdate map
,Clear map
,Historic
, andShare map
buttons get stuck disabled.To Reproduce Steps to reproduce the behavior (TIP: Provide a direct URL using the "Share" button above the map):
Historic
button.Current
button.Expected behavior The layer shouldn't get duplicated and the buttons shouldn't get stuck disabled.
Environment Browser: Chrome Version 126.0.6478.127
Screenshots![cesi-issue2](https://github.com/ramp4-pcar4/cesi_testing_party_240709/assets/25874602/dc6c411f-46ad-48e4-9ea4-22c6491a4401)