check for undefined rather than null

This commit is contained in:
Cam Otts 2023-05-24 09:02:12 -05:00
parent 434972a9f1
commit 8e0ae86214
No known key found for this signature in database
GPG Key ID: 367B7C7EBD84A8BD

View File

@ -22,7 +22,7 @@ const SetPasswordForm = (props) => {
useEffect(() => {
metadata.configuration().then(resp => {
if(!resp.error) {
if (resp.data.touLink !== null && resp.data.touLink.trim() !== "") {
if (resp.data.touLink !== undefined && resp.data.touLink.trim() !== "") {
setTou(resp.data.touLink)
}
setPasswordLength(resp.data.passwordRequirements.length)