Skip to content

Commit

Permalink
race condition on map render (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
OSPFNeighbour authored Jul 16, 2018
1 parent 1a0bd3a commit 4d6916e
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions client/src/screens/events/Detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,20 @@ class Detail extends Component {
}

zoomMap(fitToTheseCoordinates) {
this.map.fitToCoordinates(
fitToTheseCoordinates,
{
edgePadding: {
top: 300,
right: 100,
bottom: 300,
left: 100,
if (fitToTheseCoordinates.length) {
this.map.fitToCoordinates(
fitToTheseCoordinates,
{
edgePadding: {
top: 300,
right: 100,
bottom: 300,
left: 100,
},
animated: true,
},
animated: true,
},
);
);
}
}

zoomToRegionMap(fitToTheseCoordinates) {
Expand Down

0 comments on commit 4d6916e

Please sign in to comment.