Skip to content

Commit

Permalink
fix case when there is no origin. closes serverless/serverless#6… (#239)
Browse files Browse the repository at this point in the history
fix case when there is no origin. closes serverless/serverless#6497
  • Loading branch information
dschep authored Aug 5, 2019
2 parents e2f680b + bc02969 commit 594cbce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/deployment/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ const parseDeploymentData = async (ctx, status = 'success', error = null, archiv
if (origin) {
origin = origin.trim();
const remotes = await git.getRemotes();
vcs.originUrl = remotes.filter(({ name }) => name === origin)[0].refs.fetch;
const originRemote = remotes.filter(({ name }) => name === origin)[0];
if (originRemote) vcs.originUrl = originRemote.refs.fetch;
}
vcs.branch = branch.current;
}
Expand Down

0 comments on commit 594cbce

Please sign in to comment.