Skip to content
Permalink
Browse files

jquery core: Closes #3737. Fixed a possible null dereference.

  • Loading branch information
flesler committed Dec 25, 2008
1 parent eff400e commit 8cd50a398dfd9ab8ad93c7c26749c67345c14d74
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/core.js
@@ -1016,12 +1016,14 @@ jQuery.extend({

if ( fragment ) {
for ( var i = 0; ret[i]; i++ ) {
if ( jQuery.nodeName( ret[i], "script" ) ) {
ret[i].parentNode.removeChild( ret[i] );
elem = ret[i];
if ( jQuery.nodeName( elem, "script" ) ) {
if( elem.parentNode )
elem.parentNode.removeChild( elem );
} else {
if ( ret[i].nodeType === 1 )
ret = jQuery.merge( ret, ret[i].getElementsByTagName("script"));
fragment.appendChild( ret[i] );
if ( elem.nodeType === 1 )
ret = jQuery.merge( ret, elem.getElementsByTagName("script"));
fragment.appendChild( elem );
}
}

0 comments on commit 8cd50a3

Please sign in to comment.
You can’t perform that action at this time.