diff --git a/source/_partials/post/old-post-message.html.twig b/source/_partials/post/old-post-message.html.twig index 76098da5..6475c5fc 100644 --- a/source/_partials/post/old-post-message.html.twig +++ b/source/_partials/post/old-post-message.html.twig @@ -1,6 +1,9 @@ {% macro shouldDisplayOldPostMessage(post) %} {% set cutOffDate = 'today -1 year'|date('U') %} - {{ post.date <= cutOffDate }} + + {% if post.date is not empty %} + {{ post.date <= cutOffDate }} + {% endif %} {% endmacro %} {% import _self as helpers %}