Skip to content

Commit

Permalink
fix: safe config.repo
Browse files Browse the repository at this point in the history
resolve Cannot read properties of undefined (reading 'provider') if no repo is provided
  • Loading branch information
dnldsht committed Mar 8, 2023
1 parent a14d749 commit 2e687d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default async function defaultMain(args: Argv) {
if (args.push === true) {
await execa("git", ["push", "--follow-tags"], { cwd });
}
if (args.github !== false && config.repo.provider === "github") {
if (args.github !== false && config.repo?.provider === "github") {
await githubRelease(config, {
version: config.newVersion,
body: markdown.split("\n").slice(2).join("\n"),
Expand Down

0 comments on commit 2e687d7

Please sign in to comment.