Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Nov 10, 2024
1 parent 58c634b commit b1b2069
Show file tree
Hide file tree
Showing 17 changed files with 450 additions and 735 deletions.
1 change: 1 addition & 0 deletions modules/templates/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func NewFuncMap() template.FuncMap {
"ctx": func() any { return nil }, // template context function

"DumpVar": dumpVar,
"NIL": func() any { return nil },

// -----------------------------------------------------------------
// html/template related functions
Expand Down
12 changes: 2 additions & 10 deletions routers/web/repo/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -788,19 +788,11 @@ func CompareDiff(ctx *context.Context) {

if !nothingToCompare {
// Setup information for new form.
retrieveRepoMetasForIssueWriter(ctx, ctx.Repo.Repository, true)
pageMetaData := retrieveRepoIssueMetaData(ctx, ctx.Repo.Repository, nil, true)
if ctx.Written() {
return
}
labelsData := retrieveRepoLabels(ctx, ctx.Repo.Repository, 0, true)
if ctx.Written() {
return
}
RetrieveRepoReviewers(ctx, ctx.Repo.Repository, nil, true)
if ctx.Written() {
return
}
_, templateErrs := setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates, labelsData)
_, templateErrs := setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates, pageMetaData)
if len(templateErrs) > 0 {
ctx.Flash.Warning(renderErrorOfTemplates(ctx, templateErrs), true)
}
Expand Down
Loading

0 comments on commit b1b2069

Please sign in to comment.