Skip to content

Commit

Permalink
This makes late lat/long binding work
Browse files Browse the repository at this point in the history
If lat/log are loaded dynamically, they might not
be there when google-map is ready, and _centerMap will throw.
  • Loading branch information
atotic authored and - committed Jun 8, 2015
1 parent 3502c11 commit 3c1591f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
},

_updateCenter: function() {
if (this.map) {
if (this.map && this.latitude !== undefined && this.longitude !== undefined) {
// allow for latitude and longitude to be String-typed, but still Number valued
var lati = Number(this.latitude);
if (isNaN(lati)) {
Expand Down

0 comments on commit 3c1591f

Please sign in to comment.