Skip to content

Commit 4a07942

Browse files
committed
sync script update
1 parent b6f1306 commit 4a07942

File tree

1 file changed

+1
-1
lines changed
  • apps/svelte.dev/scripts/sync-packages

1 file changed

+1
-1
lines changed

apps/svelte.dev/scripts/sync-packages/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ async function getNpmAndGitHubData(pkg: string): Promise<PackageKey & PackageNpm
155155
const token = process.env.GITHUB_TOKEN;
156156
const headers = token ? new Headers({ authorization: 'Bearer ' + token }) : {};
157157
const res = await fetchJson(`https://api.github.com/repos/${git_org}/${git_repo}`, { headers });
158-
if (res.message && res.message.startsWith('API rate limit exceeded')) {
158+
if (res?.message && res?.message.startsWith('API rate limit exceeded')) {
159159
skipGithubStars = true;
160160
} else {
161161
github_stars = res.stargazers_count;

0 commit comments

Comments
 (0)