Standardized the type checks across core. isFunction and isArray now use Object.prototype.toString to verify the type, .constructor use was removed in favor of typeof, typeof checks now use ===, undefined checks use === undefined. All of this is outlined in the new style guidelines: http://docs.jquery.com/JQuery_Core_Style_Guidelines#Type_Checks. Fixes bug #3618.
This commit is contained in:
parent
0aa8d40cdf
commit
ab551c2b14
6 changed files with 52 additions and 54 deletions
|
@ -133,7 +133,7 @@ jQuery.each( ['Left', 'Top'], function(i, name) {
|
|||
jQuery.fn[ method ] = function(val) {
|
||||
if (!this[0]) return;
|
||||
|
||||
return val != undefined ?
|
||||
return val !== undefined ?
|
||||
|
||||
// Set the scroll offset
|
||||
this.each(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue