From ad574ba89a3b5f6b8a5d69f3f4a623234dbcd7a9 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Sat, 10 Feb 2024 21:09:27 +0100 Subject: [PATCH] Check if timeline exists before displaying it --- .../partials/components/timeline.liquid | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/_includes/partials/components/timeline.liquid b/src/_includes/partials/components/timeline.liquid index 69c1feb..dd14920 100644 --- a/src/_includes/partials/components/timeline.liquid +++ b/src/_includes/partials/components/timeline.liquid @@ -1,12 +1,14 @@ -
    - {%- for elements in timeline -%} - {% assign data = elements.data %} - {% render 'partials/components/timeline-item', - start: data.startDate, - end: data.endDate, - link: data.link, - title: data.title, - location: data.location, - description: data.description %} - {%- endfor -%} -
\ No newline at end of file +{% if timeline %} +
    + {%- for elements in timeline -%} + {% assign data = elements.data %} + {% render 'partials/components/timeline-item', + start: data.startDate, + end: data.endDate, + link: data.link, + title: data.title, + location: data.location, + description: data.description %} + {%- endfor -%} +
+{% endif %} \ No newline at end of file