Use for loop instead of for/in loop to protect sanctity of Array.prototype. Fixes #7817. Test case for this commit is shared with the fix for #6355, https://github.com/jquery/jquery/pull/140 .

This commit is contained in:
Dave Methvin 2010-12-21 10:00:49 -05:00
parent 4424bda377
commit acab4ab0e5

View file

@ -87,7 +87,7 @@ jQuery.xhr = function( _native ) {
}
// Apply option prefilters
for (i in prefilters) {
for ( i = 0; i < prefilters.length; i++ ) {
prefilters[i](s);
}