Skip to content

Commit

Permalink
Merge pull request #43232 from Expensify/aldo_replace-boolean-call
Browse files Browse the repository at this point in the history
Replace Boolean by !!
  • Loading branch information
neil-marcellini authored Jun 6, 2024
2 parents 83ab052 + e543b60 commit 774a3ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/libs/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,7 @@ function hasNoticeTypeViolation(transactionID: string, transactionViolations: On
* Checks if any violations for the provided transaction are of type 'warning'
*/
function hasWarningTypeViolation(transactionID: string, transactionViolations: OnyxCollection<TransactionViolation[]>): boolean {
return Boolean(
transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === CONST.VIOLATION_TYPES.WARNING),
);
return !!transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === CONST.VIOLATION_TYPES.WARNING);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/pages/signin/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function getRenderOptions({
}

// Show the Welcome form if a user is signing up for a new account in a domain that is not controlled
const shouldShouldSignUpWelcomeForm = Boolean(credentials?.login) && !account?.validated && !account?.accountExists && !account?.domainControlled;
const shouldShouldSignUpWelcomeForm = !!credentials?.login && !account?.validated && !account?.accountExists && !account?.domainControlled;
const shouldShowLoginForm = !shouldShowAnotherLoginPageOpenedMessage && !hasLogin && !hasValidateCode;
const shouldShowEmailDeliveryFailurePage = hasLogin && hasEmailDeliveryFailure && !shouldShowChooseSSOOrMagicCode && !shouldInitiateSAMLLogin;
const isUnvalidatedSecondaryLogin = hasLogin && !isPrimaryLogin && !account?.validated && !hasEmailDeliveryFailure;
Expand Down

0 comments on commit 774a3ec

Please sign in to comment.