Skip to content

Commit ec1a8cd

Browse files
authored
Merge pull request #60343 from bernhardoj/fix/58730-validation-open-for-invalid-contact-method
Fix validation is triggered for invalid contact
2 parents 017630a + 80424cd commit ec1a8cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
171171

172172
useEffect(() => {
173173
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
174-
if (loginData?.validatedDate || prevPendingDeletedLogin) {
174+
if (!loginData || loginData?.validatedDate || prevPendingDeletedLogin) {
175175
return;
176176
}
177177
resetContactMethodValidateCodeSentState(contactMethod);
178178
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- The prevPendingDeletedLogin is a ref, so no need to add it to dependencies.
179-
}, [contactMethod, loginData?.validatedDate]);
179+
}, [contactMethod, loginData]);
180180

181181
const getThreeDotsMenuItems = useCallback(() => {
182182
const menuItems = [];

0 commit comments

Comments
 (0)