Pass vnode.state as context to onbeforeremove.

This commit is contained in:
Pierre-Yves Gerardy 2016-07-29 15:15:10 +02:00
parent 0566b04a0f
commit 72bc17e9b4

View file

@ -337,11 +337,11 @@ module.exports = function($window) {
} }
if (vnode.attrs && vnode.attrs.onbeforeremove) { if (vnode.attrs && vnode.attrs.onbeforeremove) {
expected++ expected++
vnode.attrs.onbeforeremove.call(vnode, vnode, callback) vnode.attrs.onbeforeremove.call(vnode.state, vnode, callback)
} }
if (typeof vnode.tag !== "string" && vnode.tag.onbeforeremove) { if (typeof vnode.tag !== "string" && vnode.tag.onbeforeremove) {
expected++ expected++
vnode.tag.onbeforeremove.call(vnode, vnode, callback) vnode.tag.onbeforeremove.call(vnode.state, vnode, callback)
} }
if (expected > 0) return if (expected > 0) return
} }