Skip to content

Commit 34101db

Browse files
author
KuroGuo
committed
fix getContainedComponents in IE 11
1 parent 5837d2f commit 34101db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/directives/if.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ module.exports = {
8888
function contains (c) {
8989
var cur = start
9090
var next
91+
var isElementNode
9192
while (next !== end) {
9293
next = cur.nextSibling
93-
if (cur.contains(c.$el)) {
94+
isElementNode = cur.nodeType === Node.ELEMENT_NODE
95+
if (isElementNode && cur.contains(c.$el)) {
9496
return true
9597
}
9698
cur = next

0 commit comments

Comments
 (0)