Skip to content

Commit 06a2df1

Browse files
authored
Merge branch 'main' into debug/button-anchor-nesting
2 parents a51c8e2 + c29caa3 commit 06a2df1

File tree

2 files changed

+31
-26
lines changed

2 files changed

+31
-26
lines changed

debug/src/debug.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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
);

debug/test/browser/debug.test.js

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)