diff options
author | John Resig <jeresig@gmail.com> | 2009-12-06 20:20:49 -0800 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-12-06 20:20:49 -0800 |
commit | 62a34450c0961e461a72ce4d96f94551ef393b56 (patch) | |
tree | 69661819f18de9d63ea59413398e3e6ebf720e46 /src | |
parent | 59802928566b6be3a66d65e77c2418fff37e6f5f (diff) | |
download | jquery-62a34450c0961e461a72ce4d96f94551ef393b56.tar.gz jquery-62a34450c0961e461a72ce4d96f94551ef393b56.zip |
Added an extra function check to prevent crashes in Safari 2. Fixes #3039.
Diffstat (limited to 'src')
-rw-r--r-- | src/core.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core.js b/src/core.js index b738ce485..c865bfb9a 100644 --- a/src/core.js +++ b/src/core.js @@ -417,7 +417,9 @@ jQuery.extend({ if ( array != null ) { // The window, strings (and functions) also have 'length' - if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval ) { + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) { push.call( ret, array ); } else { jQuery.merge( ret, array ); |