Make the state undefined, not null during class and closure component initialization

This commit is contained in:
Pierre-Yves Gerardy 2017-03-27 09:55:43 +02:00
parent 2d2c53fcfc
commit 32ada55e00
2 changed files with 3 additions and 3 deletions

View file

@ -109,7 +109,7 @@ module.exports = function($window) {
if (sentinel.$$reentrantLock$$ != null) return $emptyFragment
sentinel.$$reentrantLock$$ = true
} else {
vnode.state = null
vnode.state = void 0
sentinel = vnode.tag
if (sentinel.$$reentrantLock$$ != null) return $emptyFragment
sentinel.$$reentrantLock$$ = true

View file

@ -894,7 +894,7 @@ o.spec("component", function() {
o("Constructible", function() {
var oninit = o.spy()
var component = o.spy(function(vnode){
o(vnode.state).equals(null)
o(vnode.state).equals(undefined)
o(oninit.callCount).equals(0)
})
var view = o.spy(function(){
@ -920,7 +920,7 @@ o.spec("component", function() {
return ""
})
var component = o.spy(function(vnode) {
o(vnode.state).equals(null)
o(vnode.state).equals(undefined)
o(oninit.callCount).equals(0)
return state = {
view: view