Skip to content

Commit

Permalink
add default value for default branch (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhendi authored Nov 5, 2024
1 parent 99bae87 commit 3cc13f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/shared/RepoTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
:repo-type="repoType"
:namespace-path="path"
:download-count="repoDetail.downloads"
:currentBranch="repoDetail.default_branch"
:currentBranch="repoDetail.default_branch || 'main'"
:widget-type="repoDetail.widget_type"
/>
</template>
Expand Down Expand Up @@ -330,7 +330,7 @@
location.href = summaryUrl()
break
case 'files':
location.href = `/${props.repoType}s/${props.path}/files/${props.repoDetail.default_branch}`
location.href = `/${props.repoType}s/${props.path}/files/${props.repoDetail.default_branch || 'main'}`
break
case 'community':
location.href = `/${props.repoType}s/${props.path}/community`
Expand Down

0 comments on commit 3cc13f2

Please sign in to comment.