Skip to content

Commit

Permalink
fix(clerk-js): Correct initial ref value for form feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
desiprisg committed Oct 25, 2023
1 parent 8b3a53e commit 760add9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .changeset/breezy-bikes-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
8 changes: 3 additions & 5 deletions packages/clerk-js/src/ui/elements/FormControl.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { FieldId } from '@clerk/types';
import type { ClerkAPIError } from '@clerk/types';
import type { ClerkAPIError, FieldId } from '@clerk/types';
import type { PropsWithChildren } from 'react';
import { useRef } from 'react';
import React, { forwardRef, useCallback, useMemo, useState } from 'react';
import React, { forwardRef, useCallback, useMemo, useRef, useState } from 'react';

import type { LocalizationKey } from '../customizables';
import {
Expand Down Expand Up @@ -151,7 +149,7 @@ export const FormFeedback = (props: FormFeedbackProps) => {
const feedbacksRef = useRef<{
a?: Feedback;
b?: Feedback;
}>({ a: { feedback, feedbackType, shouldEnter: true }, b: undefined });
}>({ a: undefined, b: undefined });

const { getFormTextAnimation } = useFormTextAnimation();
const defaultElementDescriptors = {
Expand Down

0 comments on commit 760add9

Please sign in to comment.