Skip to content

Commit

Permalink
fix(app): don't set empty points
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh committed Oct 8, 2024
1 parent 4460645 commit cf3f838
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/pageElements/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,10 @@ export default function PlssMap({ color, dispatch, drawerOpen, state }) {
);
}

setUserGraphics(points);
dispatch({ type: 'map/userPoints', payload: points });
if (points.length > 0) {
setUserGraphics(points);
dispatch({ type: 'map/userPoints', payload: points });
}
}

if (signInCheckResult?.signedIn === false) {
Expand Down

0 comments on commit cf3f838

Please sign in to comment.