do not crash on null date
This commit is contained in:
parent
9b29c3d1ad
commit
7f2efe0b7c
@ -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;
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user