Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/lib/ui/AccessCodeForm/AccessCodeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ function Content({
}

const start = startDate.toISO()
if (start == null) {
if (start === null) {
throw new Error(`Invalid start date: ${startDate.invalidReason}`)
}

const end = endDate.toISO()
if (end == null) {
if (end === null) {
throw new Error(`Invalid end date: ${endDate.invalidReason}`)
}

Expand Down Expand Up @@ -172,8 +172,7 @@ function Content({
? t.codeLengthRequirement(codeLengthRequirement)
: null

const hasCodeInputs =
accessCode?.type !== 'time_bound' || accessCode.is_offline_access_code
const hasCodeInputs = accessCode?.is_offline_access_code !== true

return (
<>
Expand Down
Loading