Simplify the logic in $.type, thanks to jdalton for the suggesiton in 5d2be7e299
.
This commit is contained in:
parent
5d2be7e299
commit
7f18d29287
1 changed files with 2 additions and 4 deletions
|
@ -446,10 +446,8 @@ jQuery.extend({
|
|||
},
|
||||
|
||||
type: function( obj ) {
|
||||
return obj === null ?
|
||||
"null" :
|
||||
obj === undefined ?
|
||||
"undefined" :
|
||||
return obj == null ?
|
||||
String( obj ) :
|
||||
toString.call(obj).slice(8, -1).toLowerCase();
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue