Fix panic when get editor config file (#36241)

Fix #36239
This commit is contained in:
Lunny Xiao
2025-12-25 19:26:23 -08:00
committed by GitHub
parent 776e406363
commit ff3d68b98a
5 changed files with 29 additions and 52 deletions
+7 -1
View File
@@ -9,5 +9,11 @@ func (repo *Repository) GetBlob(idStr string) (*Blob, error) {
if err != nil {
return nil, err
}
return repo.getBlob(id)
if id.IsZero() {
return nil, ErrNotExist{id.String(), ""}
}
return &Blob{
ID: id,
repo: repo,
}, nil
}