From aeaa3b9e5dca686da232b614a286d6bb9dcd4d71 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 23 Jan 2020 15:04:25 +1100 Subject: [PATCH] hide verify password when password is not set --- ts/components/session/RegistrationTabs.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ts/components/session/RegistrationTabs.tsx b/ts/components/session/RegistrationTabs.tsx index 1602bcfbe..ff647d473 100644 --- a/ts/components/session/RegistrationTabs.tsx +++ b/ts/components/session/RegistrationTabs.tsx @@ -437,8 +437,9 @@ export class RegistrationTabs extends React.Component<{}, State> { } private renderNamePasswordAndVerifyPasswordFields() { + const {password, passwordFieldsMatch} = this.state; const passwordsDoNotMatch = - !this.state.passwordFieldsMatch && this.state.password + !passwordFieldsMatch && this.state.password ? window.i18n('passwordsDoNotMatch') : undefined; @@ -470,18 +471,18 @@ export class RegistrationTabs extends React.Component<{}, State> { }} /> - { this.onPasswordVerifyChanged(val); }} onEnterPressed={() => { this.handlePressEnter(); }} - /> + />} ); }