Skip to content

Commit

Permalink
Never return undefined from useValidation()
Browse files Browse the repository at this point in the history
  • Loading branch information
bl-nero committed Dec 4, 2024
1 parent 1df3878 commit 5e020d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/packages/shared/components/Validation/Validation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export function Validation(props: {
);
}

export function useValidation(): Validator | undefined {
export function useValidation(): Validator {
const validator = React.useContext(ValidationContext);
if (!validator) {
throw new Error('useValidation() called without a validation context');
Expand Down

0 comments on commit 5e020d9

Please sign in to comment.