We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 300014f commit a90933aCopy full SHA for a90933a
src/utils/releases.ts
@@ -1,3 +1,5 @@
1
+import { resolve } from "node:path/posix";
2
+
3
interface Release {
4
name: string;
5
body: string;
@@ -31,8 +33,8 @@ export async function fetchRelease(repo: string): Promise<Release[]> {
31
33
return cached;
32
34
}
35
- const json = (await fetch(`https://api.github.com/repos/${repo}/releases`, options).then((response) =>
- response.json()
36
+ const json = (await fetch(`https://api.github.com/repos/${repo}/releases`, options).then((r) =>
37
+ r.ok ? r.json() : [{}]
38
)) as any[];
39
40
const out: Release[] = json
0 commit comments