forked from kevadesu/forgejo
Fix potential bugs (#10513)
* use e if it is an option * potential nil so check err first * check err first * m == nil already checked
This commit is contained in:
parent
15fbf509d3
commit
e57ac841de
7 changed files with 14 additions and 10 deletions
|
@ -213,7 +213,7 @@ func (a *Action) getCommentLink(e Engine) string {
|
|||
return "#"
|
||||
}
|
||||
if a.Comment == nil && a.CommentID != 0 {
|
||||
a.Comment, _ = GetCommentByID(a.CommentID)
|
||||
a.Comment, _ = getCommentByID(e, a.CommentID)
|
||||
}
|
||||
if a.Comment != nil {
|
||||
return a.Comment.HTMLURL()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue