aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index 331db68d..9aa4f2c7 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -115,7 +115,8 @@ JQLite.prototype = {
remove: function() {
this.dealoc();
- this[0].parentNode.removeChild(this[0]);
+ var parentNode = this[0].parentNode;
+ if (parentNode) parentNode.removeChild(this[0]);
},
removeAttr: function(name) {