diff --git a/src/frontend/src/Components/map/camPopup.js b/src/frontend/src/Components/map/camPopup.js index ded2881cf..99020ba02 100644 --- a/src/frontend/src/Components/map/camPopup.js +++ b/src/frontend/src/Components/map/camPopup.js @@ -37,6 +37,7 @@ export default function CamPopup(props) { const newCam = camFeature.id ? camFeature : camFeature.getProperties(); setRootCam(newCam); setCamera(newCam); + setCamIndex(0); }, [camFeature]); useEffect(() => { @@ -44,7 +45,6 @@ export default function CamPopup(props) { isInitialMount.current = false; return; } - setCamera(rootCam.camGroup[camIndex]); }, [camIndex]);