Skip to content

Commit fde2bb4

Browse files
committed
minor fix
1 parent aa26999 commit fde2bb4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/app/page.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -556,13 +556,16 @@ export default function HomePage() {
556556
});
557557

558558
await fetchIssuesAndPRs(fromDate, isOrg)
559-
.then(() => {
560-
if (allLatestCommits.length > 0 || issuesAndPRs.length > 0) {
559+
.catch((err) => {
560+
console.error('Error fetching issues and PRs:', err);
561+
setIssuesAndPRs([]);
562+
})
563+
.finally(() => {
564+
if (allLatestCommits.length > 0) {
561565
setProgress(null);
562566
return generateSummary(allLatestCommits);
563567
}
564-
})
565-
.catch(console.error);
568+
});
566569

567570
} catch (err) {
568571
setError(err instanceof Error ? err.message : "Failed to fetch commits");

0 commit comments

Comments
 (0)