Skip to content

Commit

Permalink
Merge pull request #52307 from ZhenjaHorbach/qbd-export-settings-defa…
Browse files Browse the repository at this point in the history
…ult-exporter

fix bug with default exporter
  • Loading branch information
lakchote authored Nov 12, 2024
2 parents ad61376 + 479d368 commit 058b3af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ function QuickbooksDesktopExportPage({policy}: WithPolicyConnectionsProps) {
{
description: translate('workspace.accounting.preferredExporter'),
onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_PREFERRED_EXPORTER.getRoute(policyID)),
title: qbdConfig?.export?.exporter ?? policyOwner,
// We use the logical OR (||) here instead of ?? because `exporter` could be an empty string
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
title: qbdConfig?.export?.exporter || policyOwner,
subscribedSettings: [CONST.QUICKBOOKS_DESKTOP_CONFIG.EXPORTER],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ function QuickbooksDesktopPreferredExporterConfigurationPage({policy}: WithPolic
value: exporter.email,
text: exporter.email,
keyForList: exporter.email,
isSelected: (currentExporter ?? policy?.owner) === exporter.email,
// We use the logical OR (||) here instead of ?? because `exporter` could be an empty string
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
isSelected: (currentExporter || policy?.owner) === exporter.email,
});
return options;
}, []),
Expand Down

0 comments on commit 058b3af

Please sign in to comment.