> child.type.name.toString() === 'RadioButton'
Well, relying on the name of a function/class when your building workflow minifies your code is indeed an unfortunate decision.
Moreover, it sounds like an attempt to use JavaScript in a classic OOP way. Your correction relies on duck typing instead, and it's more in line with JavaScript's nature, which mean not checking what an object *is*, but what an object *does*.