forked from Gitlink/gitea_hat
新增:submodule为nil判断
This commit is contained in:
parent
4f2b053d16
commit
bc2c836cf1
|
|
@ -178,7 +178,9 @@ func GetContents(ctx context.Context, repo *repo_model.Repository, treePath, ref
|
|||
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