]> source.dussan.org Git - jquery.git/commitdiff
Added a check to make sure a parent node exists in call remove() to avoid errors...
authorDavid Serduke <davidserduke@gmail.com>
Mon, 5 Nov 2007 18:49:00 +0000 (18:49 +0000)
committerDavid Serduke <davidserduke@gmail.com>
Mon, 5 Nov 2007 18:49:00 +0000 (18:49 +0000)
src/core.js

index 7b97646aef96e0bf3ffc40c9932271bae1593681..9e36082cf2d7fb46dc0e26741eb7e30705caa0da 100644 (file)
@@ -1268,7 +1268,8 @@ jQuery.each({
                                jQuery.event.remove(this);\r
                                jQuery.removeData(this);\r
                        });\r
-                       this.parentNode.removeChild( this );\r
+                       if (this.parentNode)\r
+                               this.parentNode.removeChild( this );\r
                }\r
        },\r
 \r