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() {
393393 type === 'tr' &&
394394 domParentName !== 'thead' &&
395395 domParentName !== 'tfoot' &&
396- domParentName !== 'tbody' &&
397- domParentName !== 'table'
396+ domParentName !== 'tbody'
398397 ) {
399398 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.' +
401400 serializeVNode ( vnode ) +
402401 `\n\n${ getOwnerStack ( vnode ) } `
403402 ) ;
Original file line number Diff line number Diff line change @@ -543,12 +543,14 @@ describe('debug', () => {
543543 it ( 'Accepts minimal well formed table' , ( ) => {
544544 const Table = ( ) => (
545545 < 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 >
552554 </ table >
553555 ) ;
554556 render ( < Table /> , scratch ) ;
@@ -586,23 +588,27 @@ describe('debug', () => {
586588 it ( 'accepts valid nested tables' , ( ) => {
587589 const Table = ( ) => (
588590 < 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 >
606612 </ table >
607613 ) ;
608614
You can’t perform that action at this time.
0 commit comments