Added a check to make sure a parent node exists in call remove() to avoid errors as seen in bug #1742.

This commit is contained in:
David Serduke 2007-11-05 18:49:00 +00:00
parent 98204c7f60
commit a613a70fdb

View File

@ -1268,7 +1268,8 @@ jQuery.each({
jQuery.event.remove(this);
jQuery.removeData(this);
});
this.parentNode.removeChild( this );
if (this.parentNode)
this.parentNode.removeChild( this );
}
},