File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/features/posts/components/Changelog Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,12 @@ type Props = {
88
99const { repo } = Astro .props
1010const repoInfo = await getGitHubRepo (repo )
11- if (! repoInfo ) {
12- console .error (` Repo ${repo } not found ` )
13- }
14- const { url, object } = repoInfo
15- const changelogHtml = await markdownToHtml (
16- object .text .replace (' ### Changelog' , ' ' )
17- )
11+ if (! repoInfo ) console .error (` Repo ${repo } not found ` )
12+
13+ const changelogHtml =
14+ repoInfo ?.object != null
15+ ? await markdownToHtml (repoInfo .object .text .replace (' ### Changelog' , ' ' ))
16+ : null
1817---
1918
2019{
@@ -24,7 +23,7 @@ const changelogHtml = await markdownToHtml(
2423 <div class = { styles .changelog } id = " changelog" >
2524 <p class = { styles .source } >
2625 sourced from{ " " }
27- <a href = { ` ${url }/tree/main/CHANGELOG.md ` } >
26+ <a href = { ` ${repoInfo . url }/tree/main/CHANGELOG.md ` } >
2827 <code >{ ` ${repo }:CHANGELOG.md ` } </code >
2928 </a >
3029 </p >
You can’t perform that action at this time.
0 commit comments