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 7b97646..9e36082 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