From 3384fc71ef40122af1af730f1d187f86ecf4221c Mon Sep 17 00:00:00 2001 From: bartektomczyk Date: Tue, 13 Feb 2024 08:59:38 +0100 Subject: [PATCH] fix: code stytle fixes --- src/hooks/useSubStep/types.ts | 2 +- src/languages/es.ts | 2 +- src/libs/ErrorUtils.ts | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/hooks/useSubStep/types.ts b/src/hooks/useSubStep/types.ts index edcf70482089..ffdee5825197 100644 --- a/src/hooks/useSubStep/types.ts +++ b/src/hooks/useSubStep/types.ts @@ -21,7 +21,7 @@ type UseSubStep = { /** array of components that will become sub steps */ bodyContent: Array>; - /** called on last sub step */ + /** called on last sub step */ onFinished: () => void; /** index of initial sub step to display */ diff --git a/src/languages/es.ts b/src/languages/es.ts index cd16a257ebfc..8f7f4a678535 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -143,7 +143,7 @@ export default { continue: 'Continuar', firstName: 'Nombre', lastName: 'Apellidos', - phone: 'teléfono', + phone: 'Teléfono', phoneNumber: 'Número de teléfono', phoneNumberPlaceholder: '(xxx) xxx-xxxx', email: 'Email', diff --git a/src/libs/ErrorUtils.ts b/src/libs/ErrorUtils.ts index 9d3e01aba501..7db0cd4c3eb0 100644 --- a/src/libs/ErrorUtils.ts +++ b/src/libs/ErrorUtils.ts @@ -61,10 +61,7 @@ type OnyxDataWithErrors = { }; function getLatestErrorMessage(onyxData: TOnyxData | null): Localize.MaybePhraseKey { - if (!onyxData) { - return ''; - } - const errors = onyxData.errors ?? {}; + const errors = onyxData?.errors ?? {}; if (Object.keys(errors).length === 0) { return '';