We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 846181a + 031296d commit 766b486Copy full SHA for 766b486
1 file changed
packages/fxa-settings/src/components/Settings/ModalVerifySession/index.tsx
@@ -74,8 +74,11 @@ export const ModalVerifySession = ({
74
getStatus();
75
}, [session, onCompleted]);
76
77
- const buttonDisabled =
78
- !formState.isDirty || !formState.isValid || account.loading;
+ // Destructure formState in advance to avoid logical operator short-circuiting
+ // causing the isValid field to be conditionally subscribed.
79
+ const { isDirty, isValid } = formState;
80
+ const buttonDisabled = !isDirty || !isValid || account.loading;
81
+
82
return (
83
!session.verified && (
84
<Modal
0 commit comments