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
|
// get proper date in utc
|
||||||
eleventyConfig.addFilter('realDate', (value) => {
|
eleventyConfig.addFilter('realDate', (value) => {
|
||||||
const actualDate = value;
|
const actualDate = new Date(value);
|
||||||
actualDate.setDate(value.getDate() + 1);
|
actualDate.setDate(actualDate.getDate() + 1);
|
||||||
return actualDate;
|
return actualDate;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user