diff --git a/app/views/api.js b/app/views/api.js index 1f5de32..645c038 100644 --- a/app/views/api.js +++ b/app/views/api.js @@ -45,7 +45,7 @@ export default async(state) => { }; const tags = await getTags(repository); - const currentTag = tag.length ? tag : tags[0]; + const currentTag = tag && tag.length ? tag : tags[0]; try { const apiResponse = await parseApiFile({ repo: repository, tag: currentTag });