Skip to content

Commit f149696

Browse files
committed
Default next-meeting lat/long to last-meeting lat/long, and if that's not there the original hard-coded values that were in the template. Otherwise empty template substitution leaves broken javascript, and our page no-worky.
1 parent 509a976 commit f149696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonkc_site/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ <h2>{{ event.name|safe }}</h2>
7979
pykc.map;
8080

8181
pykc.mapInit = function() {
82-
var latlng = new google.maps.LatLng({{ next_event.venue.lat }}, {{ next_event.venue.lon }});
82+
var latlng = new google.maps.LatLng({{ next_event.venue.lat|default:past_events.0.venue.lat|default:-34.397 }}, {{ next_event.venue.lon|default:past_events.0.venue.lon|default:150.644 }});
8383
var opts = {
8484
zoom: 8,
8585
center: latlng,

0 commit comments

Comments
 (0)