diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index f0232b6df075..ee3934cacc06 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -60,10 +60,11 @@ function WorkspaceWorkflowsPage({policy, betas, route}: WorkspaceWorkflowsPagePr title: translate('workflowsPage.delaySubmissionTitle'), subtitle: translate('workflowsPage.delaySubmissionDescription'), onToggle: (isEnabled: boolean) => { - const frequency = policy?.autoReportingFrequency === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT || !policy?.autoReportingFrequency - ? CONST.POLICY.AUTO_REPORTING_FREQUENCIES.WEEKLY - : policy.autoReportingFrequency; - Policy.setWorkspaceAutoReporting(route.params.policyID, isEnabled, frequency); + const frequency = + policy?.autoReportingFrequency === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT || !policy?.autoReportingFrequency + ? CONST.POLICY.AUTO_REPORTING_FREQUENCIES.WEEKLY + : policy.autoReportingFrequency; + Policy.setWorkspaceAutoReporting(route.params.policyID, isEnabled, frequency); }, subMenuItems: (