aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-12-06 20:20:49 -0800
committerJohn Resig <jeresig@gmail.com>2009-12-06 20:20:49 -0800
commit62a34450c0961e461a72ce4d96f94551ef393b56 (patch)
tree69661819f18de9d63ea59413398e3e6ebf720e46 /src
parent59802928566b6be3a66d65e77c2418fff37e6f5f (diff)
downloadjquery-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.js4
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 );