From 5b4fcdbb5f6d2a1cfffc3e2d2103b7a5ea56db54 Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Mon, 2 May 2016 08:21:13 -0500 Subject: [PATCH] Add errort trapping for blank start dates. Fixes #168 --- themes/devopsdays-legacy/layouts/partials/future.html | 4 ++-- themes/devopsdays-legacy/layouts/partials/map.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/devopsdays-legacy/layouts/partials/future.html b/themes/devopsdays-legacy/layouts/partials/future.html index 626838c80ca..2c8b645cb85 100644 --- a/themes/devopsdays-legacy/layouts/partials/future.html +++ b/themes/devopsdays-legacy/layouts/partials/future.html @@ -11,13 +11,13 @@ {{ range seq .Now.Year (add .Now.Year 1) }} {{ $future_year := (chomp .) }} {{ range $.Site.Data.events }} - {{ if and (eq .year $future_year) (eq .status "current") }} + {{ if and (eq .year $future_year) (eq .status "current") ( .startdate ) }} {{ $.Scratch.SetInMap "future_years" $future_year $future_year }} {{ $.Scratch.SetInMap (print "future" $future_year) .startdate .friendly }} {{ end }} {{ end }} {{ end }} - +

Future

diff --git a/themes/devopsdays-legacy/layouts/partials/map.html b/themes/devopsdays-legacy/layouts/partials/map.html index ee58c350586..02fdeb8c5dd 100644 --- a/themes/devopsdays-legacy/layouts/partials/map.html +++ b/themes/devopsdays-legacy/layouts/partials/map.html @@ -22,7 +22,7 @@ // Get Latitude and Longitude of a Point: http://itouchmap.com/latlong.html var markers = [ {{ range $.Site.Data.events }} - {{ if eq .status "current" }} + {{ if and (eq .status "current") ( .startdate ) }} ['{{ .city}}', {{ .coordinates | safeJS }}, '{{ dateFormat "Jan 2" .startdate }}', '/events/{{ .friendly }}'], {{ end }} {{ end }}