We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18e755c commit d2c515eCopy full SHA for d2c515e
routers/web/repo/view.go
@@ -711,11 +711,12 @@ func checkCitationFile(ctx *context.Context, entry *git.TreeEntry) {
711
}
712
for _, entry := range allEntries {
713
if entry.Name() == "CITATION.cff" || entry.Name() == "CITATION.bib" {
714
- ctx.Data["CitiationExist"] = true
715
// Read Citation file contents
716
- ctx.PageData["citationFileContent"], err = entry.Blob().GetBlobContent(setting.UI.MaxDisplayFileSize)
717
- if err != nil {
+ if content, err := entry.Blob().GetBlobContent(setting.UI.MaxDisplayFileSize); err != nil {
718
log.Error("checkCitationFile: GetBlobContent: %v", err)
+ } else {
+ ctx.Data["CitiationExist"] = true
719
+ ctx.PageData["citationFileContent"] = content
720
721
break
722
0 commit comments