This commit is contained in:
Josh Deprez 2021-09-27 16:31:43 +10:00
parent 300b9a1c3d
commit 26345f7d71
2 changed files with 2 additions and 5 deletions

View file

@ -79,10 +79,7 @@ func (g *Game) updateRecursive(c interface{}) error {
return err
}
}
if c == g { // prevent infinite recursion
return nil
}
if u, ok := c.(Updater); ok {
if u, ok := c.(Updater); ok && c != g {
return u.Update()
}
return nil