Fix remove bug

This commit is contained in:
Josh Deprez 2022-03-17 11:09:07 +11:00
parent 6014d6068e
commit ca23e0e06b

View file

@ -121,7 +121,7 @@ func (c *Container) Remove(component interface{}) {
return return
} }
c.items[i] = nil c.items[i] = nil
delete(c.reverse, i) delete(c.reverse, component)
if len(c.reverse) < len(c.items)/2 { if len(c.reverse) < len(c.items)/2 {
c.compact() c.compact()
} }