We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3938d89 commit 9bc28aaCopy full SHA for 9bc28aa
src/frontend/src/Components/map/camPopup.js
@@ -22,8 +22,9 @@ export default function CamPopup(props) {
22
const isInitialMount = useRef(true);
23
24
// useState hooks
25
- const [rootCam, setRootCam] = useState();
26
- const [camera, setCamera] = useState();
+ const newCam = camFeature.id ? camFeature : camFeature.getProperties();
+ const [rootCam, setRootCam] = useState(newCam);
27
+ const [camera, setCamera] = useState(newCam);
28
const [camIndex, setCamIndex] = useState(0);
29
30
// useEffect hooks
0 commit comments