fix GetIGDBAppParent
This commit is contained in:
parent
543210a4ae
commit
4490c817db
@ -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
Loading…
Reference in New Issue
Block a user