Skip to content

Commit

Permalink
Fixed cases where download URL not available
Browse files Browse the repository at this point in the history
  • Loading branch information
rlebre committed Mar 10, 2024
1 parent fd9fafd commit 0dfee93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/downloads.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export const getStaticProps = async () => {
const ghData = await getReleases();

const releases = ghData
.filter((release) => release.assets[0]?.browser_download_url !== '')
.filter((release) => !!release.assets[0]?.browser_download_url)
.sort(
(release1: GhRelease, release2: GhRelease) =>
Date.parse(release2.published_at) - Date.parse(release1.published_at)
Expand Down

0 comments on commit 0dfee93

Please sign in to comment.