diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index 10ca3cd79190..d0c30b7dc672 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -133,7 +133,8 @@ function ProfilePage(props) { const navigateBackTo = lodashGet(props.route, 'params.backTo', ROUTES.HOME); - const notificationPreference = !_.isEmpty(props.report) ? props.translate(`notificationPreferencesPage.notificationPreferences.${props.report.notificationPreference}`) : ''; + const shouldShowNotificationPreference = !_.isEmpty(props.report) && props.report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; + const notificationPreference = shouldShowNotificationPreference ? props.translate(`notificationPreferencesPage.notificationPreferences.${props.report.notificationPreference}`) : ''; // eslint-disable-next-line rulesdir/prefer-early-return useEffect(() => { @@ -226,7 +227,7 @@ function ProfilePage(props) { ) : null} {shouldShowLocalTime && } - {!_.isEmpty(props.report) && notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN && ( + {shouldShowNotificationPreference && (