From 75676c2b07b217c80a6679e8a1485e57d79acb51 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.uk>
Date: Fri, 21 Apr 2017 08:37:42 +0100
Subject: [PATCH] Don't display upcoming events if there aren't any

Fixes #31
---
 source/talks.twig | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/source/talks.twig b/source/talks.twig
index 1cb20b2b6..879a401e1 100644
--- a/source/talks.twig
+++ b/source/talks.twig
@@ -26,12 +26,14 @@ use: [talks, posts]
     {% endfor %}
 {% endfor %}
 
-<h2>Upcoming Talks</h2>
+{% if upcoming_events is not empty %}
+    <h2>Upcoming Talks</h2>
 
-{% include "talks-table" with {
-    events: upcoming_events|sortbyfield('date'),
-    hide_feedback: true,
-} %}
+    {% include "talks-table" with {
+        events: upcoming_events|sortbyfield('date'),
+        hide_feedback: true,
+    } %}
+{% endif %}
 
 <h2>Last 5 Talks</h2>