Skip to content

Commit

Permalink
Fix typecheck error
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Jan 13, 2025
1 parent c7a1ab8 commit 78cc07d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ export function LoadBackupModal({
const budgetIdToLoad = budgetId ?? prefsBudgetId;

useEffect(() => {
send('backups-get', { id: budgetIdToLoad }).then(setBackups);
if (budgetIdToLoad) {
send('backups-get', { id: budgetIdToLoad }).then(setBackups);
}
}, [budgetIdToLoad]);

useEffect(() => {
if (watchUpdates) {
listen('backups-updated', setBackups);
return () => unlisten('backups-updated');
return listen('backups-updated', setBackups);
}
}, [watchUpdates]);

Expand Down

0 comments on commit 78cc07d

Please sign in to comment.