Skip to content

Commit

Permalink
fix: reset form location on map location change
Browse files Browse the repository at this point in the history
  • Loading branch information
friedjoff committed Apr 27, 2020
1 parent 466c028 commit 933ca1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function tree(state = initialState, action) {
case SET_MAP_LAYER:
return { ...state, mapLayer: action.mapLayer };
case SET_MAP_LOCATION: {
return { ...state, mapLocation: action.mapLocation, projectionMode: 'm' };
const { mapLocation } = action;
return { ...state, formLocation: {}, mapLocation, projectionMode: 'm' };
}
case SET_MAP_VIEW:
return { ...state, mapView: action.mapView };
Expand Down

0 comments on commit 933ca1c

Please sign in to comment.