Skip to content

Commit

Permalink
fix: RevisionFormField component crashes in 'refs' API returns no tags (
Browse files Browse the repository at this point in the history
#4735)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
  • Loading branch information
Alexander Matyushentsev committed Nov 3, 2020
1 parent 422a26e commit b97f4f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class RevisionFormField extends React.PureComponent<RevisionFormFieldProp
if (src.repoURL) {
return services.repos
.revisions(src.repoURL)
.then(revisionsRes => ['HEAD'].concat(revisionsRes.branches).concat(revisionsRes.tags))
.then(revisionsRes => ['HEAD'].concat(revisionsRes.branches || []).concat(revisionsRes.tags || []))
.catch(() => []);
}
return [];
Expand Down

0 comments on commit b97f4f7

Please sign in to comment.