Fix #11962. Standardize getter return values for empty sets.

This commit is contained in:
Uri Gilad
2012-07-09 23:06:51 -04:00
committed by Dave Methvin
parent 376f4e8cf6
commit 21b0db7993
4 changed files with 14 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ jQuery.fn.offset = function( options ) {
doc = elem && elem.ownerDocument;
if ( !doc ) {
return null;
return;
}
if ( (body = doc.body) === elem ) {
@@ -103,7 +103,7 @@ jQuery.fn.extend({
position: function() {
if ( !this[0] ) {
return null;
return;
}
var elem = this[0],