From 7f2efe0b7c2b8f14396080625cd0559a03a5e38b Mon Sep 17 00:00:00 2001 From: eggy Date: Fri, 16 Apr 2021 23:18:55 -0400 Subject: [PATCH] do not crash on null date --- .eleventy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index aba41eb..38e390e 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -30,8 +30,8 @@ module.exports = function(eleventyConfig) { // get proper date in utc eleventyConfig.addFilter('realDate', (value) => { - const actualDate = value; - actualDate.setDate(value.getDate() + 1); + const actualDate = new Date(value); + actualDate.setDate(actualDate.getDate() + 1); return actualDate; })