Skip to content

Commit

Permalink
fix: ucard number being null/undef in weird situations
Browse files Browse the repository at this point in the history
  • Loading branch information
Gobot1234 committed May 7, 2024
1 parent bdbdd76 commit 348c50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/forge/src/components/signin/actions/UCardInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useDispatch } from "react-redux";

const UCardInput: FlowStepComponent = ({ onPrimary }) => {
const dispatch = useDispatch<AppDispatch>();
const [otp, setOtp] = useState(useSignInSessionField("ucard_number")!); // OTP is now handled as a string
const [otp, setOtp] = useState(useSignInSessionField("ucard_number") ?? ""); // OTP is now handled as a string
const [isOtpValid, setIsOtpValid] = useState(otp.length === UCARD_LENGTH);

const handleOtpChange = (value: string) => {
Expand Down

0 comments on commit 348c50f

Please sign in to comment.