mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 21:37:37 -05:00
Fix #11962. Standardize getter return values for empty sets.
This commit is contained in:
@@ -225,7 +225,7 @@ jQuery.fn.extend({
|
||||
if ( value === undefined ) {
|
||||
return elem.nodeType === 1 ?
|
||||
elem.innerHTML.replace( rinlinejQuery, "" ) :
|
||||
null;
|
||||
undefined;
|
||||
}
|
||||
|
||||
// See if we can take a shortcut and just use innerHTML
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user