diff --git a/src/manipulation.js b/src/manipulation.js index aff90bd4a..269b1d043 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -185,8 +185,8 @@ jQuery.fn.extend({ i = 0, l = this.length; - if ( value === undefined ) { - return elem.nodeType === 1 ? elem.innerHTML: undefined; + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; } // See if we can take a shortcut and just use innerHTML