Fix #11439. Remove use of undefined jQuery.support.parentNode.

This commit is contained in:
Robert Katic 2012-03-05 22:57:34 +01:00 committed by Dave Methvin
parent dc337f628c
commit 077fd7ed6f

View File

@ -287,7 +287,7 @@ jQuery.fn.extend({
}, },
domManip: function( args, table, callback ) { domManip: function( args, table, callback ) {
var results, first, fragment, parent, var results, first, fragment,
value = args[0], value = args[0],
scripts = []; scripts = [];
@ -307,16 +307,7 @@ jQuery.fn.extend({
} }
if ( this[0] ) { if ( this[0] ) {
parent = value && value.parentNode; results = jQuery.buildFragment( args, this, scripts );
// If we're in a fragment, just use that instead of building a new one
if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
results = { fragment: parent };
} else {
results = jQuery.buildFragment( args, this, scripts );
}
fragment = results.fragment; fragment = results.fragment;
if ( fragment.childNodes.length === 1 ) { if ( fragment.childNodes.length === 1 ) {