Skip to content

Commit

Permalink
avoid to lose map info when adding map_config_loaded that is any way …
Browse files Browse the repository at this point in the history
…overridden from MAP_INFO_LOADED
  • Loading branch information
MV88 committed Nov 14, 2024
1 parent 7270a20 commit 6863a19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/client/reducers/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6863a19

Please sign in to comment.