Fix state initialisation logic

This commit is contained in:
Barney Carroll 2017-01-06 17:12:56 +00:00
parent a19eae2792
commit e1ea2822c9

View file

@ -95,9 +95,7 @@ module.exports = function($window) {
return element
}
function createComponent(vnode, hooks, ns) {
// For object literals since `Vnode()` always sets the `state` field.
if (!vnode.state) vnode.state = Object.create(vnode.tag)
vnode.state = Object.create(vnode.tag)
var view = vnode.tag.view
if (view.reentrantLock != null) return $emptyFragment
view.reentrantLock = true