Skip to content

Commit 00232af

Browse files
committed
handle empty latlon
1 parent 353a88d commit 00232af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/plots/geo/geo.js

+4
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,8 @@ proto._render = function() {
625625
var k;
626626

627627
function translatePoints(d) {
628+
if(!d.lonlat) return null;
629+
628630
var lonlatPx = projection(d.lonlat);
629631
return lonlatPx ?
630632
strTranslate(lonlatPx[0], lonlatPx[1]) :
@@ -685,6 +687,8 @@ function getProjection(geoLayout) {
685687
}
686688

687689
projection.isLonLatOverEdges = function(lonlat) {
690+
if(!lonlat) return false;
691+
688692
if(projection(lonlat) === null) {
689693
return true;
690694
}

0 commit comments

Comments
 (0)