Skip to content

Commit

Permalink
Merge pull request snyk#1092 from snyk/fix/app-os-cli
Browse files Browse the repository at this point in the history
fix: make sure branch exists
  • Loading branch information
eran_k committed Apr 29, 2020
2 parents c8b4b8e + 71ed530 commit 39a5284
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/monitor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export async function monitor(

const target = await projectMetadata.getInfo(pkg, meta);

if (isGitTarget(target)) {
if (isGitTarget(target) && target.branch) {
analytics.add('targetBranch', target.branch);
}

Expand Down Expand Up @@ -246,7 +246,7 @@ export async function monitorGraph(

const target = await projectMetadata.getInfo(pkg, meta);

if (isGitTarget(target)) {
if (isGitTarget(target) && target.branch) {
analytics.add('targetBranch', target.branch);
}

Expand Down

0 comments on commit 39a5284

Please sign in to comment.