Skip to content

Commit

Permalink
treat tab "overview" as "repositories" in user profiles without profi…
Browse files Browse the repository at this point in the history
…le readme
  • Loading branch information
hazycora committed Sep 18, 2023
1 parent 8099238 commit 0c778f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routers/web/user/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ func userProfile(ctx *context.Context) {

func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileGitRepo *git.Repository, profileReadme *git.Blob) {
// if there is a profile readme, default to "overview" page, otherwise, default to "repositories" page
// if there is not a profile readme, the overview tab should be treated as the repositories tab
tab := ctx.FormString("tab")
if tab == "" {
if tab == "" || tab == "overview" {
if profileReadme != nil {
tab = "overview"
} else {
Expand Down

0 comments on commit 0c778f5

Please sign in to comment.