aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jqLite.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index 78fc1655..d16ce19e 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -371,8 +371,8 @@ forEach({
},
parent: function(element) {
- // in IE it returns undefined, but we need differentiate it from functions which have no return
- return element.parentNode || null;
+ var parent = element.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
},
next: function(element) {