Skip to content

Commit

Permalink
fix old logic
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Mar 9, 2023
1 parent 9b765c8 commit 703dfd3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web_src/js/components/RepoBranchTagDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ export function initRepoBranchTagDropdown(selector) {
}
if (!data.noTag) {
for (const tag of data.tags) {
data.items.push({name: tag, url: tag, branch: false, tag: true, selected: tag === data.release?.tagName});
if (data.release) {
data.items.push({name: tag, url: tag, branch: false, tag: true, selected: tag === data.release.tagName});
} else {
data.items.push({name: tag, url: tag, branch: false, tag: true, selected: tag === data.defaultBranch});
}
}
}

Expand Down

0 comments on commit 703dfd3

Please sign in to comment.