Skip to content

Commit

Permalink
Merge pull request #170 from devopsdays/mattstratton/check-for-null
Browse files Browse the repository at this point in the history
Add errort trapping for blank start dates. Fixes #168
  • Loading branch information
mattstratton committed May 2, 2016
2 parents 37adeab + 41efccc commit 07dd7f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions themes/devopsdays-legacy/layouts/partials/future.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

<div class="span-6 last">
<div style=" padding-top:18px;" class="span-5 last">
<h1>Future</h1>
Expand Down
2 changes: 1 addition & 1 deletion themes/devopsdays-legacy/layouts/partials/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 07dd7f0

Please sign in to comment.