We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a513d7 commit aa838d1Copy full SHA for aa838d1
src/lib/ui/AccessCodeForm/AccessCodeForm.tsx
@@ -80,12 +80,12 @@ function Content({
80
}
81
82
const start = startDate.toISO()
83
- if (start == null) {
+ if (start === null) {
84
throw new Error(`Invalid start date: ${startDate.invalidReason}`)
85
86
87
const end = endDate.toISO()
88
- if (end == null) {
+ if (end === null) {
89
throw new Error(`Invalid end date: ${endDate.invalidReason}`)
90
91
@@ -172,8 +172,7 @@ function Content({
172
? t.codeLengthRequirement(codeLengthRequirement)
173
: null
174
175
- const hasCodeInputs =
176
- accessCode?.type !== 'time_bound' || accessCode.is_offline_access_code
+ const hasCodeInputs = accessCode?.is_offline_access_code !== true
177
178
return (
179
<>
0 commit comments