do not crash on null date

This commit is contained in:
eggy 2021-04-16 23:18:55 -04:00
parent 9b29c3d1ad
commit 7f2efe0b7c

View File

@ -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;
})