diff --git a/.github/workflows/sponsors.yml b/.github/workflows/sponsors.yml index b74369a451..15a22967ac 100644 --- a/.github/workflows/sponsors.yml +++ b/.github/workflows/sponsors.yml @@ -36,8 +36,7 @@ jobs: - name: Update the README run: npm run update-sponsors env: - CHEERIO_SPONSORS_GITHUB_TOKEN: - ${{ secrets.GITHUB_TOKEN }} + CHEERIO_SPONSORS_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} IMGIX_TOKEN: ${{ secrets.IMGIX_TOKEN }} - name: Create Pull Request diff --git a/.gitignore b/.gitignore index c83ccb858c..825145a372 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ npm-debug.log /coverage /lib /website/docs/api +/website/build diff --git a/scripts/fetch-sponsors.mts b/scripts/fetch-sponsors.mts index 7c50411f10..7e3e3e316d 100644 --- a/scripts/fetch-sponsors.mts +++ b/scripts/fetch-sponsors.mts @@ -226,11 +226,11 @@ async function fetchGitHubSponsors(): Promise { type: // Workaround to get the type — fetch a field that only exists on users. sponsor.isViewer === undefined ? 'ORGANIZATION' : 'INDIVIDUAL', - monthlyDonation: tier.monthlyPriceInDollars * 100, + monthlyDonation: (tier?.monthlyPriceInDollars ?? 0) * 100, totalDonations: getMonthsActive(createdAt) * tier.monthlyPriceInDollars * 100, source: 'github', - tier: getTierSlug(tier.monthlyPriceInDollars), + tier: getTierSlug(tier?.monthlyPriceInDollars ?? 0), }), ); }