From 933ca1cd2dad5054abade25e7d1e516145661636 Mon Sep 17 00:00:00 2001 From: Friedjoff Trautwein Date: Mon, 27 Apr 2020 16:00:14 +0200 Subject: [PATCH] fix: reset form location on map location change --- src/store/reducers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/reducers.js b/src/store/reducers.js index 67b634f3..b97b4f5d 100644 --- a/src/store/reducers.js +++ b/src/store/reducers.js @@ -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 };