Skip to content

Commit

Permalink
Ensure validateDOMNesting catches nested body elements
Browse files Browse the repository at this point in the history
  • Loading branch information
keyz committed Apr 9, 2016
1 parent 6c11bb6 commit fa748de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/renderers/dom/client/__tests__/validateDOMNesting-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,7 @@ describe('ReactContextValidator', function() {
expect(isTagStackValid(['table', 'tr'])).toBe(false);
expect(isTagStackValid(['div', 'ul', 'li', 'div', 'li'])).toBe(false);
expect(isTagStackValid(['div', 'html'])).toBe(false);
expect(isTagStackValid(['body', 'body'])).toBe(false);
expect(isTagStackValid(['svg', 'foreignObject', 'body', 'p'])).toBe(false);
});
});
1 change: 1 addition & 0 deletions src/renderers/dom/client/validateDOMNesting.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ if (__DEV__) {
case 'frame':
case 'head':
case 'html':
case 'body':
case 'tbody':
case 'td':
case 'tfoot':
Expand Down

0 comments on commit fa748de

Please sign in to comment.