mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 07:43:18 -05:00
Backport #23588 by @viletyy #23587 submodule path is nil It is panic a nil error Co-authored-by: 来自村里的小螃蟹 <yystopf@163.com>
This commit is contained in:
parent
a3b917151c
commit
782c376c8b
1 changed files with 3 additions and 1 deletions
|
@ -214,7 +214,9 @@ func GetContents(ctx context.Context, repo *repo_model.Repository, treePath, ref
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
contentsResponse.SubmoduleGitURL = &submodule.URL
|
if submodule != nil && submodule.URL != "" {
|
||||||
|
contentsResponse.SubmoduleGitURL = &submodule.URL
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Handle links
|
// Handle links
|
||||||
if entry.IsRegular() || entry.IsLink() {
|
if entry.IsRegular() || entry.IsLink() {
|
||||||
|
|
Loading…
Reference in a new issue