forked from Gitlink/gitea-1156
fix: repo submodule is nil
This commit is contained in:
parent
c13048756b
commit
f4becdc341
|
@ -184,7 +184,9 @@ func GetContents(repo *models.Repository, treePath, ref string, forList bool) (*
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
contentsResponse.SubmoduleGitURL = &submodule.URL
|
||||
if submodule != nil {
|
||||
contentsResponse.SubmoduleGitURL = &submodule.URL
|
||||
}
|
||||
}
|
||||
// Handle links
|
||||
if entry.IsRegular() || entry.IsLink() {
|
||||
|
|
Loading…
Reference in New Issue