From a613a70fdb87163efa25a2d853cb9ed736d8cc39 Mon Sep 17 00:00:00 2001 From: David Serduke Date: Mon, 5 Nov 2007 18:49:00 +0000 Subject: [PATCH] Added a check to make sure a parent node exists in call remove() to avoid errors as seen in bug #1742. --- src/core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 7b97646..9e36082 100644 --- a/src/core.js +++ b/src/core.js @@ -1268,7 +1268,8 @@ jQuery.each({ jQuery.event.remove(this); jQuery.removeData(this); }); - this.parentNode.removeChild( this ); + if (this.parentNode) + this.parentNode.removeChild( this ); } }, -- 1.7.10.4