Closed iRonin closed 13 years ago
Really? The loop is failing???
Uncaught TypeError: Cannot read property 'lat' of undefined
Gmaps4Rails.Gmaps4Rails.createServiceMarkersFromMarkers
I'm disappointed the 'for' loop from coffeescript doesn't handle this. I'll fix that but it could be necessary in many places...
Perhaps it's only the case for ranges? I would also think for loop should handle this.
ok, got it, my code was not that clean, will replace with:
for marker, index in markers
That will fix. Anything else to add to the new version? :)
Not at the moment ;)
Gmaps4Rails.createServiceMarkersFromMarkers
throws an error whenmarkers=[]
. Simpleif
check should solve the issue, eg: