Fix panic when get editor config file (#36241)

Fix #36239
This commit is contained in:
Lunny Xiao authored and GitHub committed 2025-12-25 19:26:23 -08:00
1 parent 776e406363
commit ff3d68b98a
5 files changed
+29 -52

No files matched your search

+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
}