Backfill release dates on startup and hard-lock undated lessons

This commit is contained in:
nmemmert
2026-05-12 15:17:08 -04:00
parent d74151d91d
commit da35006a30
3 changed files with 112 additions and 4 deletions
+2 -2
View File
@@ -79,9 +79,9 @@ function isComingSoon(section: StudySection): boolean {
}
function isSectionReleased(section: StudySection): boolean {
if (!section.releasedAt) return true
if (!section.releasedAt) return false
const releaseDate = new Date(section.releasedAt)
if (Number.isNaN(releaseDate.getTime())) return true
if (Number.isNaN(releaseDate.getTime())) return false
return releaseDate <= new Date()
}