Backfill release dates on startup and hard-lock undated lessons
This commit is contained in:
@@ -113,9 +113,9 @@ function sanitizeUrl(value) {
|
||||
|
||||
function isSectionReleased(section) {
|
||||
if (!section || typeof section !== 'object') return false
|
||||
if (typeof section.releasedAt !== 'string' || !section.releasedAt.trim()) return true
|
||||
if (typeof section.releasedAt !== 'string' || !section.releasedAt.trim()) return false
|
||||
const releaseTime = Date.parse(section.releasedAt)
|
||||
if (!Number.isFinite(releaseTime)) return true
|
||||
if (!Number.isFinite(releaseTime)) return false
|
||||
return releaseTime <= Date.now()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user