File tree Expand file tree Collapse file tree 2 files changed +31
-26
lines changed Expand file tree Collapse file tree 2 files changed +31
-26
lines changed Original file line number Diff line number Diff line change @@ -393,11 +393,10 @@ export function initDebug() {
393
393
type === 'tr' &&
394
394
domParentName !== 'thead' &&
395
395
domParentName !== 'tfoot' &&
396
- domParentName !== 'tbody' &&
397
- domParentName !== 'table'
396
+ domParentName !== 'tbody'
398
397
) {
399
398
console . error (
400
- 'Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table > parent.' +
399
+ 'Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent.' +
401
400
serializeVNode ( vnode ) +
402
401
`\n\n${ getOwnerStack ( vnode ) } `
403
402
) ;
Original file line number Diff line number Diff line change @@ -543,12 +543,14 @@ describe('debug', () => {
543
543
it ( 'Accepts minimal well formed table' , ( ) => {
544
544
const Table = ( ) => (
545
545
< table >
546
- < tr >
547
- < th > Head</ th >
548
- </ tr >
549
- < tr >
550
- < td > Body</ td >
551
- </ tr >
546
+ < tbody >
547
+ < tr >
548
+ < th > Head</ th >
549
+ </ tr >
550
+ < tr >
551
+ < td > Body</ td >
552
+ </ tr >
553
+ </ tbody >
552
554
</ table >
553
555
) ;
554
556
render ( < Table /> , scratch ) ;
@@ -586,23 +588,27 @@ describe('debug', () => {
586
588
it ( 'accepts valid nested tables' , ( ) => {
587
589
const Table = ( ) => (
588
590
< table >
589
- < tr >
590
- < th > foo</ th >
591
- </ tr >
592
- < tr >
593
- < td id = "nested" >
594
- < table >
595
- < tr >
596
- < td > cell1</ td >
597
- < td > cell2</ td >
598
- < td > cell3</ td >
599
- </ tr >
600
- </ table >
601
- </ td >
602
- </ tr >
603
- < tr >
604
- < td > bar</ td >
605
- </ tr >
591
+ < tbody >
592
+ < tr >
593
+ < th > foo</ th >
594
+ </ tr >
595
+ < tr >
596
+ < td id = "nested" >
597
+ < table >
598
+ < tbody >
599
+ < tr >
600
+ < td > cell1</ td >
601
+ < td > cell2</ td >
602
+ < td > cell3</ td >
603
+ </ tr >
604
+ </ tbody >
605
+ </ table >
606
+ </ td >
607
+ </ tr >
608
+ < tr >
609
+ < td > bar</ td >
610
+ </ tr >
611
+ </ tbody >
606
612
</ table >
607
613
) ;
608
614
You can’t perform that action at this time.
0 commit comments