@@ -95,8 +95,8 @@ module.exports = function($window) {
95
95
if ( ! vnode . state ) vnode . state = { }
96
96
assign ( vnode . state , vnode . tag )
97
97
98
- initLifecycle ( vnode . tag , vnode , hooks )
99
- vnode . instance = Vnode . normalize ( vnode . tag . view . call ( vnode . state , vnode ) )
98
+ initLifecycle ( vnode . state , vnode , hooks )
99
+ vnode . instance = Vnode . normalize ( vnode . state . view . call ( vnode . state , vnode ) )
100
100
if ( vnode . instance != null ) {
101
101
if ( vnode . instance === vnode ) throw Error ( "A view cannot return the vnode it received as arguments" )
102
102
var element = createNode ( vnode . instance , hooks , ns )
@@ -257,8 +257,8 @@ module.exports = function($window) {
257
257
}
258
258
}
259
259
function updateComponent ( parent , old , vnode , hooks , nextSibling , recycling , ns ) {
260
- vnode . instance = Vnode . normalize ( vnode . tag . view . call ( vnode . state , vnode ) )
261
- updateLifecycle ( vnode . tag , vnode , hooks , recycling )
260
+ vnode . instance = Vnode . normalize ( vnode . state . view . call ( vnode . state , vnode ) )
261
+ updateLifecycle ( vnode . state , vnode , hooks , recycling )
262
262
if ( vnode . instance != null ) {
263
263
if ( old . instance == null ) insertNode ( parent , createNode ( vnode . instance , hooks , ns ) , nextSibling )
264
264
else updateNode ( parent , old . instance , vnode . instance , hooks , nextSibling , recycling , ns )
@@ -347,9 +347,9 @@ module.exports = function($window) {
347
347
expected ++
348
348
vnode . attrs . onbeforeremove . call ( vnode . state , vnode , once ( continuation ) )
349
349
}
350
- if ( typeof vnode . tag !== "string" && vnode . tag . onbeforeremove ) {
350
+ if ( typeof vnode . tag !== "string" && vnode . state . onbeforeremove ) {
351
351
expected ++
352
- vnode . tag . onbeforeremove . call ( vnode . state , vnode , once ( continuation ) )
352
+ vnode . state . onbeforeremove . call ( vnode . state , vnode , once ( continuation ) )
353
353
}
354
354
continuation ( )
355
355
function continuation ( ) {
@@ -374,7 +374,7 @@ module.exports = function($window) {
374
374
}
375
375
function onremove ( vnode ) {
376
376
if ( vnode . attrs && vnode . attrs . onremove ) vnode . attrs . onremove . call ( vnode . state , vnode )
377
- if ( typeof vnode . tag !== "string" && vnode . tag . onremove ) vnode . tag . onremove . call ( vnode . state , vnode )
377
+ if ( typeof vnode . tag !== "string" && vnode . state . onremove ) vnode . state . onremove . call ( vnode . state , vnode )
378
378
if ( vnode . instance != null ) onremove ( vnode . instance )
379
379
else {
380
380
var children = vnode . children
@@ -500,7 +500,7 @@ module.exports = function($window) {
500
500
function shouldUpdate ( vnode , old ) {
501
501
var forceVnodeUpdate , forceComponentUpdate
502
502
if ( vnode . attrs != null && typeof vnode . attrs . onbeforeupdate === "function" ) forceVnodeUpdate = vnode . attrs . onbeforeupdate . call ( vnode . state , vnode , old )
503
- if ( typeof vnode . tag !== "string" && typeof vnode . tag . onbeforeupdate === "function" ) forceComponentUpdate = vnode . tag . onbeforeupdate . call ( vnode . state , vnode , old )
503
+ if ( typeof vnode . tag !== "string" && typeof vnode . state . onbeforeupdate === "function" ) forceComponentUpdate = vnode . state . onbeforeupdate . call ( vnode . state , vnode , old )
504
504
if ( ! ( forceVnodeUpdate === undefined && forceComponentUpdate === undefined ) && ! forceVnodeUpdate && ! forceComponentUpdate ) {
505
505
vnode . dom = old . dom
506
506
vnode . domSize = old . domSize
0 commit comments