Commit 607b1dc6 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov
Browse files

Map: null bounds

parent fb55871c
......@@ -96,6 +96,10 @@ export const loadAccessionsOverviewPage = (filterCode: string) => (dispatch) =>
export const loadAccessionsMapInfo = (filters: string | AccessionFilter) => (dispatch) => {
return AccessionService.mapInfo(filters)
.then((mapInfo: AccessionMapInfo) => {
if (!(mapInfo.bounds[0][0] && mapInfo.bounds[0][1] && mapInfo.bounds[1][0] && mapInfo.bounds[1][1])) {
mapInfo.bounds = [[-170, 80], [170, -80]];
console.log('One of map bounds is null, setting to default.');
}
dispatch(receiveAccessionMapInfo(mapInfo));
dispatch(updateRoute2(mapInfo.filterCode, '/a/map'));
}).catch((error) => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment