Skip to content

Commit

Permalink
avoid null issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mapmeld committed Nov 11, 2024
1 parent 11ad326 commit b609f3b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/src/app/store/mapStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ export const useMapStore = create(
),
{
diff: (pastState: Partial<MapStore>, currentState: Partial<MapStore>) => {
if (!currentState.zoneAssignments || !pastState.zoneAssignments) return pastState;
currentState.zoneAssignments.keys().forEach((geoid) => {
if (!pastState.zoneAssignments.has(geoid)) {
pastState.zoneAssignments.set(geoid, null);
Expand Down

0 comments on commit b609f3b

Please sign in to comment.