Skip to content

Commit

Permalink
Merge pull request #31907 from Expensify/monil-fixBadgeWarning
Browse files Browse the repository at this point in the history
Fix warnings on Settings and Workspace page
  • Loading branch information
flodnv authored Nov 28, 2023
2 parents 935608b + fd1319c commit c03a541
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pages/settings/InitialSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ function InitialSettingsPage(props) {
const getMenuItems = useMemo(() => {
/**
* @param {Boolean} isPaymentItem whether the item being rendered is the payments menu item
* @returns {Number} the user wallet balance
* @returns {String|undefined} the user's wallet balance
*/
const getWalletBalance = (isPaymentItem) => isPaymentItem && CurrencyUtils.convertToDisplayString(props.userWallet.currentBalance);
const getWalletBalance = (isPaymentItem) => (isPaymentItem ? CurrencyUtils.convertToDisplayString(props.userWallet.currentBalance) : undefined);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspacesListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function WorkspacesListPage({policies, allPolicyMembers, reimbursementAccount, u

/**
* @param {Boolean} isPaymentItem whether the item being rendered is the payments menu item
* @returns {Number} the user wallet balance
* @returns {String|undefined} the user's wallet balance
*/
function getWalletBalance(isPaymentItem) {
return isPaymentItem ? CurrencyUtils.convertToDisplayString(userWallet.currentBalance) : undefined;
Expand Down

0 comments on commit c03a541

Please sign in to comment.