Ensure validateDOMNesting catches nested body elements
This commit is contained in:
parent
6c11bb65e1
commit
6cf77ef55e
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -208,6 +208,7 @@ if (__DEV__) {
|
|||
case 'rt':
|
||||
return impliedEndTags.indexOf(parentTag) === -1;
|
||||
|
||||
case 'body':
|
||||
case 'caption':
|
||||
case 'col':
|
||||
case 'colgroup':
|
||||
|
|
Loading…
Reference in New Issue