-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
Labels
Description
Description
When using Babel, specifically with array polyfills for iterator support, all array prototypes are modified for that support. Therefore, toString.call(obj) reports as [object Array Iterator] instead of simply [object Array], which jQuery has no awareness of in the class2type map. The goal would be to update the class2type map for that support so these arrays report themselves as arrays instead of objects.
I know there has been some contention with this type checking in the past, specifically around the Error object, so I decided to open an issue for discussion before submitting a PR with the changes proposed below.
Proposed changes
Not sure the best way to provide a test case for this. Instead, this is the code change I had in mind.