From 3296116041ea0eb89e123c24cf092e34ccb3f380 Mon Sep 17 00:00:00 2001 From: Jordan Boesch Date: Wed, 30 Mar 2011 11:17:48 -0600 Subject: Bug 4366; fixing $.each(document.styleSheets) from throwing errors in IE --- src/core.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core.js b/src/core.js index 9312ee288..1b06913c3 100644 --- a/src/core.js +++ b/src/core.js @@ -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; + } + } } } -- cgit v1.2.3