fix GetIGDBAppParent
Some checks failed
docker / prepare-and-build (push) Successful in 5m21s
release / goreleaser (push) Has been cancelled

This commit is contained in:
Nite07 2024-11-23 02:27:53 +08:00
parent 543210a4ae
commit 4490c817db
3 changed files with 8 additions and 8 deletions

View File

@ -99,16 +99,16 @@ func GetIGDBAppParent(id int) (int, error) {
if err != nil { if err != nil {
return 0, err return 0, err
} }
versionParent := detail.VersionParent hasParent := false
for versionParent != 0 { for detail.VersionParent != 0 {
detail, err = GetIGDBAppDetailCache(versionParent) hasParent = true
detail, err = GetIGDBAppDetailCache(detail.VersionParent)
if err != nil { if err != nil {
return 0, err return 0, err
} }
versionParent = detail.VersionParent
} }
if versionParent != 0 { if hasParent {
return versionParent, nil return detail.ID, nil
} }
return id, nil return id, nil
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long