From 21abbb016a6a3d21c7a7d3cb75b4595380745497 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Tue, 14 Jan 2025 09:15:36 -0800 Subject: [PATCH] Fix typecheck error --- .../src/components/modals/LoadBackupModal.tsx | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/desktop-client/src/components/modals/LoadBackupModal.tsx b/packages/desktop-client/src/components/modals/LoadBackupModal.tsx index bb474694ef4..beb7f42c1a6 100644 --- a/packages/desktop-client/src/components/modals/LoadBackupModal.tsx +++ b/packages/desktop-client/src/components/modals/LoadBackupModal.tsx @@ -106,14 +106,16 @@ export function LoadBackupModal({ @@ -147,11 +149,13 @@ export function LoadBackupModal({ ) : ( - dispatch( - loadBackup({ budgetId: budgetIdToLoad, backupId: id }), - ) - } + onSelect={id => { + if (budgetIdToLoad && id) { + dispatch( + loadBackup({ budgetId: budgetIdToLoad, backupId: id }), + ); + } + }} /> )}