Commit 7f18d292 authored by John Resig's avatar John Resig

Simplify the logic in $.type, thanks to jdalton for the suggesiton in...

Simplify the logic in $.type, thanks to jdalton for the suggesiton in 5d2be7e2.
parent 5d2be7e2
...@@ -446,10 +446,8 @@ jQuery.extend({ ...@@ -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();
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment