From 0218e65bea74717ecf384a227f9d84b723b07be5 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Fri, 22 Mar 2024 00:23:08 -0700 Subject: [PATCH] Fix typecheck error --- .../src/components/modals/BudgetMenuModal.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/desktop-client/src/components/modals/BudgetMenuModal.tsx b/packages/desktop-client/src/components/modals/BudgetMenuModal.tsx index 8cbba12b0cd..74e31e12343 100644 --- a/packages/desktop-client/src/components/modals/BudgetMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/BudgetMenuModal.tsx @@ -94,12 +94,14 @@ function BudgetMenu({ name: 'toggle-hidden-categories', text: 'Toggle hidden categories', }, - isReportBudgetEnabled - ? { - name: 'switch-budget-type', - text: 'Switch budget type', - } - : undefined, + ...(isReportBudgetEnabled + ? [ + { + name: 'switch-budget-type', + text: 'Switch budget type', + }, + ] + : []), ]} /> );