Jacky Zhao
2023-09-24 697bffdb8b1bef143823f77a118de90286fe325a
fix: treat the 0 time as invalid too
1 files modified
2 ■■■ changed files
quartz/plugins/transformers/lastmod.ts 2 ●●● patch | view | raw | blame | history
quartz/plugins/transformers/lastmod.ts
@@ -14,7 +14,7 @@
function coerceDate(fp: string, d: any): Date {
  const dt = new Date(d)
  const invalidDate = isNaN(dt.getTime())
  const invalidDate = isNaN(dt.getTime()) || dt.getTime() === 0
  if (invalidDate && d !== undefined) {
    console.log(
      chalk.yellow(