Bug 4366; fixing $.each(document.styleSheets) from throwing errors in IE

This commit is contained in:
Jordan Boesch 2011-03-30 11:17:48 -06:00
parent 2555a5a232
commit 3296116041
2 changed files with 13 additions and 3 deletions

View file

@ -610,8 +610,11 @@ jQuery.extend({
}
}
} else {
for ( var value = object[0];
i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
for ( ; i < length; ) {
if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
break;
}
}
}
}