Skip to content

Commit

Permalink
Merge pull request #40623 from bernhardoj/fix/39677-missing-translati…
Browse files Browse the repository at this point in the history
…on-notification-preference

Fix missing translation shown in notification preference
  • Loading branch information
aldo-expensify authored Apr 23, 2024
2 parents ffd468b + 1502ffc commit c90b46e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ function ProfilePage({route}: ProfilePageProps) {

const navigateBackTo = route?.params?.backTo;

const shouldShowNotificationPreference = !isEmptyObject(report) && !isCurrentUser && report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
const shouldShowNotificationPreference =
!isEmptyObject(report) && !isCurrentUser && !!report.notificationPreference && report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
const notificationPreference = shouldShowNotificationPreference
? translate(`notificationPreferencesPage.notificationPreferences.${report.notificationPreference}` as TranslationPaths)
: '';
Expand Down Expand Up @@ -236,7 +237,7 @@ function ProfilePage({route}: ProfilePageProps) {
shouldShowRightIcon
/>
)}
{!isEmptyObject(report) && !isCurrentUser && (
{!isEmptyObject(report) && report.reportID && !isCurrentUser && (
<MenuItem
title={`${translate('privateNotes.title')}`}
titleStyle={styles.flex1}
Expand Down

0 comments on commit c90b46e

Please sign in to comment.