jquery core: improves #3248. Functions are supported by isFunction.
authorAriel Flesler <aflesler@gmail.com>
Wed, 29 Oct 2008 01:12:27 +0000 (01:12 +0000)
committerAriel Flesler <aflesler@gmail.com>
Wed, 29 Oct 2008 01:12:27 +0000 (01:12 +0000)
src/core.js

index 9279d17..3a2548f 100644 (file)
@@ -1137,7 +1137,7 @@ jQuery.extend({
                if( array != null ){
                        var i = array.length;
                        // The window, strings (and functions) also have 'length'
-                       if( i == null || typeof array == 'string' || array.setInterval )
+                       if( i == null || typeof array == 'string' || jQuery.isFunction(array) || array.setInterval )
                                ret[0] = array;
                        else
                                while( i )