Closed BenjaminDRichards closed 8 years ago
containsDescendant()
did not function as intended. However, it didn't crash. This is because it had two errors.
The first error was testing curMember.childType() === Kiwi.Group
. This would never confirm, because Kiwi.Group
is a prototype object, and Kiwi.GROUP
is a constant returned by childType()
. So I fixed that.
The second error was never encountered, because the first error would always fail the test. This error was simply leaving a c
out, vis containsDesendant()
. Once error 1 was fixed, error 2 became possible, which testing confirmed. So I fixed that too.
This function can now test the scene hierarchy beyond a single tier, as intended.
The recursion call is misspelt. Better check this out.