diff --git a/templates/pages/generate.html b/templates/pages/generate.html index fface87..8354495 100644 --- a/templates/pages/generate.html +++ b/templates/pages/generate.html @@ -99,7 +99,8 @@ try { const graphResp = await fetch(`/api/repos/${repoId}/graph?max_commits=20`); if (graphResp.ok) { - commits = await graphResp.json(); + const gd = await graphResp.json(); + commits = gd.commits || []; } } catch (e) { console.warn('Failed to load recent commits:', e); diff --git a/templates/pages/repo.html b/templates/pages/repo.html index a178a1f..109f78d 100644 --- a/templates/pages/repo.html +++ b/templates/pages/repo.html @@ -173,7 +173,7 @@ let commits = []; try { const graphResp = await fetch(`/api/repos/${repoId}/graph?max_commits=20`); - if (graphResp.ok) commits = await graphResp.json(); + if (graphResp.ok) { const gd = await graphResp.json(); commits = gd.commits || []; } } catch (e) { /* ignore */ } populateRefSelects(currentRefs, commits); diff --git a/templates/pages/review.html b/templates/pages/review.html index 3f44bd6..c0cea55 100644 --- a/templates/pages/review.html +++ b/templates/pages/review.html @@ -121,7 +121,8 @@ try { const graphResp = await fetch(`/api/repos/${repoId}/graph?max_commits=20`); if (graphResp.ok) { - commits = await graphResp.json(); + const gd = await graphResp.json(); + commits = gd.commits || []; } } catch (e) { console.warn('Failed to load recent commits:', e);