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 ) {
|
type: function( obj ) {
|
||||||
return obj === null ?
|
return obj == null ?
|
||||||
"null" :
|
String( obj ) :
|
||||||
obj === undefined ?
|
|
||||||
"undefined" :
|
|
||||||
toString.call(obj).slice(8, -1).toLowerCase();
|
toString.call(obj).slice(8, -1).toLowerCase();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue