diff --git a/client/src/components/MapView/LayerControl.tsx b/client/src/components/MapView/LayerControl.tsx index 3b7c239747a..50421f406ff 100644 --- a/client/src/components/MapView/LayerControl.tsx +++ b/client/src/components/MapView/LayerControl.tsx @@ -95,7 +95,7 @@ class LayerControl implements IControl { const groupInput = document.createElement('input'); groupInput.onchange = () => { groupDiv.querySelectorAll('input.layer').forEach((i) => { - const input = i as HTMLInputElement; + groupDiv.querySelectorAll('input.layer').forEach((input) => { input.checked = groupInput.checked; const event = new Event('change'); input.dispatchEvent(event);