Backfill release dates on startup and hard-lock undated lessons
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user