Skip to content

Commit

Permalink
Remove unnecessary optional chaining (#903)
Browse files Browse the repository at this point in the history
This optional chaining is unnecessary because errors.mail at the beginning of the line ensures errors.mail is not nullish.
  • Loading branch information
frontendlane committed Aug 5, 2023
1 parent a396710 commit 98efa1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export default function App() {
{...register("mail", { required: "Email Address is required" })}
aria-invalid={errors.mail ? "true" : "false"}
/>
{errors.mail && <p role="alert">{errors.mail?.message}</p>}
{errors.mail && <p role="alert">{errors.mail.message}</p>}
<input type="submit" />
</form>
Expand Down

1 comment on commit 98efa1d

@vercel
Copy link

@vercel vercel bot commented on 98efa1d Aug 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-hook-form-website – ./

react-hook-form-website-git-master-hook-form.vercel.app
react-hook-form.com
react-hook-form-website-hook-form.vercel.app

Please sign in to comment.