File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -250,11 +250,11 @@ export function printCommit(data: number[]) {
250
250
case MsgTypes . REMOVE_VNODE : {
251
251
const unmounts = data [ i + 1 ] ;
252
252
i += 2 ;
253
- const len = i + unmounts ;
254
253
console . log ( `total unmounts: ${ unmounts } ` ) ;
255
- for ( ; i < len ; i ++ ) {
256
- console . log ( ` Remove: %c${ data [ i ] } ` , "color: red" ) ;
254
+ for ( let j = 0 ; j < unmounts ; j ++ ) {
255
+ console . log ( ` Remove: %c${ data [ i + j ] } ` , "color: red" ) ;
257
256
}
257
+ i += unmounts - 1 ;
258
258
break ;
259
259
}
260
260
case MsgTypes . REORDER_CHILDREN : {
@@ -304,6 +304,21 @@ export function printCommit(data: number[]) {
304
304
i ++ ;
305
305
break ;
306
306
}
307
+ case MsgTypes . HOC_NODES : {
308
+ const id = data [ i + 1 ] ;
309
+ const count = data [ i + 2 ] ;
310
+ const hocs = [ ] ;
311
+ for ( let j = 0 ; j < count ; j ++ ) {
312
+ hocs . push ( strings [ data [ i + 3 + j ] - 1 ] ) ;
313
+ }
314
+ console . log (
315
+ ` Add HOCs: %c${ id } %c${ hocs . join ( ", " ) } ` ,
316
+ "color: yellow" ,
317
+ "font-size: 10px; color: #ccc; background-color: #444; padding: .1rem .3rem; border-radius: 2px;" ,
318
+ ) ;
319
+ i += 2 + count ;
320
+ break ;
321
+ }
307
322
default : {
308
323
console . log ( "Not implemented" , data [ i ] ) ;
309
324
}
You can’t perform that action at this time.
0 commit comments