Skip to content

Commit 98efa1d

Browse files
authored
Remove unnecessary optional chaining (react-hook-form#903)
This optional chaining is unnecessary because errors.mail at the beginning of the line ensures errors.mail is not nullish.
1 parent a396710 commit 98efa1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/get-started.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ export default function App() {
628628
{...register("mail", { required: "Email Address is required" })}
629629
aria-invalid={errors.mail ? "true" : "false"}
630630
/>
631-
{errors.mail && <p role="alert">{errors.mail?.message}</p>}
631+
{errors.mail && <p role="alert">{errors.mail.message}</p>}
632632
633633
<input type="submit" />
634634
</form>

0 commit comments

Comments
 (0)