mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Added some tweaks to $.type to handle null and undefined. Added a bunch of unit tests as well.
This commit is contained in:
@@ -446,7 +446,11 @@ jQuery.extend({
|
||||
},
|
||||
|
||||
type: function( obj ) {
|
||||
return toString.call(obj).slice(8, -1).toLowerCase();
|
||||
return obj === null ?
|
||||
"null" :
|
||||
obj === undefined ?
|
||||
"undefined" :
|
||||
toString.call(obj).slice(8, -1).toLowerCase();
|
||||
},
|
||||
|
||||
isPlainObject: function( obj ) {
|
||||
|
||||
Reference in New Issue
Block a user