diff --git a/src/frontend/src/Components/map/Map.js b/src/frontend/src/Components/map/Map.js index 97e2ce691..c627bc58f 100644 --- a/src/frontend/src/Components/map/Map.js +++ b/src/frontend/src/Components/map/Map.js @@ -180,10 +180,8 @@ export default function DriveBCMap(props) { const [staleLinkMessage, setStaleLinkMessage] = useState(); const clickedFeatureRef = useRef(); const updateClickedFeature = feature => { - // Remove highlight from feature on click - if (feature && feature.get('highlight')) { - + if (feature && feature instanceof Feature && feature.get('highlight')) { // Remove highlight from feature feature.set("highlight", false)