From 6863a19c3078de1f43eae830aa76f7ef2e1970c1 Mon Sep 17 00:00:00 2001 From: MV88 Date: Thu, 14 Nov 2024 18:48:29 +0100 Subject: [PATCH] avoid to lose map info when adding map_config_loaded that is any way overridden from MAP_INFO_LOADED --- web/client/reducers/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/reducers/config.js b/web/client/reducers/config.js index 45a0a6a44e..286796e176 100644 --- a/web/client/reducers/config.js +++ b/web/client/reducers/config.js @@ -63,7 +63,7 @@ function mapConfig(state = null, action) { // if map is loaded from an already saved map keep the same id let mapId = state?.map?.mapId || state?.map?.present?.mapId; mapId = action.config?.fileName && mapId ? mapId : action.mapId; - newMapState.map = assign({}, newMapState.map, {mapId, size, bbox, version: hasVersion ? action.config.version : 1}); + newMapState.map = assign({}, newMapState.map, {mapId, size, bbox, version: hasVersion ? action.config.version : 1, info: state?.map?.present?.info}); // we store the map initial state for future usage return assign({}, newMapState, {mapInitialConfig: {...newMapState.map, mapId: action.mapId}}); case MAP_CONFIG_LOAD_ERROR: