diff options
Diffstat (limited to 'src/core.js')
-rw-r--r-- | src/core.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core.js b/src/core.js index 5927d1936..3d5f4be3f 100644 --- a/src/core.js +++ b/src/core.js @@ -427,9 +427,12 @@ jQuery.extend({ }, type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ core_toString.call(obj) ] || "object"; + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; }, isPlainObject: function( obj ) { |