Skip to content

Commit

Permalink
Add some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Brown committed Dec 11, 2024
1 parent ffe189e commit 454dbd0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export async function loadingFundingInfo(context: Writable<State>): Promise<void
: $walletStore.network.name
: '';

// We can't make a useful FUNDING.json with an address or network.
if (!address || !network) {
return;
}
Expand All @@ -28,6 +29,9 @@ export async function loadingFundingInfo(context: Writable<State>): Promise<void
const { ownerName, repoName } = $context.project?.source ?? unreachable();
fundingObject = await github.fetchFundingJson(ownerName, repoName);
} catch (error) {
// if the FUNDING.json is not found, that's fine. It means we need a new one, so
// we continue below. Otherwise (here), something is wrong and we should show
// an error.
if (!(error as Error).message.includes('not found')) {
throw error;
}
Expand Down

0 comments on commit 454dbd0

Please sign in to comment.