fix domBinding infinite loop

This commit is contained in:
Kevin Jahns 2018-05-08 13:45:51 +02:00
parent 92c2fbd6d3
commit ca13849828

View File

@ -91,10 +91,10 @@ export default function domObserver (mutations, _document) {
const dom = mutation.target
const yxml = this.domToType.get(dom)
if (yxml === undefined) { // In case yxml is undefined, we double check if we forgot to bind the dom
let parent
let parent = dom
let yParent
do {
parent = dom.parentNode
parent = parent.parentNode
yParent = this.domToType.get(parent)
} while (yParent === undefined && parent !== null)
if (yParent !== false && yParent !== undefined && yParent.constructor !== YXmlHook) {