Skip to content

Commit

Permalink
Fix git diff including 404 responses
Browse files Browse the repository at this point in the history
  • Loading branch information
misode committed Oct 4, 2024
1 parent 5b5cc02 commit 763b701
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/versions/VersionDiff.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export function VersionDiff({ version }: Props) {
return { file, diff: [] }
} else if (isText) {
const [beforeStr, afterStr] = await Promise.all([
fetch(`${mcmetaRawUrl}/${commit?.parents[0].sha}/${filename}`).then(r => r.text()),
fetch(`${mcmetaRawUrl}/${version}-diff/${filename}`).then(r => r.text()),
fetch(`${mcmetaRawUrl}/${commit?.parents[0].sha}/${filename}`).then(r => r.ok ? r.text() : ''),
fetch(`${mcmetaRawUrl}/${version}-diff/${filename}`).then(r => r.ok ? r.text() : ''),
])
patch = createPatch(filename, beforeStr, afterStr)
}
Expand Down

0 comments on commit 763b701

Please sign in to comment.