aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Boesch <jboesch26@gmail.com>2011-03-30 11:17:48 -0600
committerJordan Boesch <jboesch26@gmail.com>2011-03-30 11:17:48 -0600
commit3296116041ea0eb89e123c24cf092e34ccb3f380 (patch)
tree11d0b6e06f4413271992ad55810b0bf9b9e7896f /src
parent2555a5a2322f78fc1cfc8a0f2b55580fc79d2f32 (diff)
downloadjquery-3296116041ea0eb89e123c24cf092e34ccb3f380.tar.gz
jquery-3296116041ea0eb89e123c24cf092e34ccb3f380.zip
Bug 4366; fixing $.each(document.styleSheets) from throwing errors in IE
Diffstat (limited to 'src')
-rw-r--r--src/core.js7
1 files changed, 5 insertions, 2 deletions
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;
+ }
+ }
}
}