diff --git a/src/renderers/dom/client/__tests__/validateDOMNesting-test.js b/src/renderers/dom/client/__tests__/validateDOMNesting-test.js index 7f13be17c1..a7878289cb 100644 --- a/src/renderers/dom/client/__tests__/validateDOMNesting-test.js +++ b/src/renderers/dom/client/__tests__/validateDOMNesting-test.js @@ -55,7 +55,8 @@ describe('ReactContextValidator', function() { it('allows any tag with no context', function() { // With renderToString (for example), we don't know where we're mounting the // tag so we must err on the side of leniency. - specialTags.concat(formattingTags, ['mysterytag']).forEach(function(tag) { + var allTags = [].concat(specialTags, formattingTags, ['mysterytag']); + allTags.forEach(function(tag) { expect(validateDOMNesting.isTagValidInContext(tag, null)).toBe(true); }); }); diff --git a/src/renderers/dom/client/validateDOMNesting.js b/src/renderers/dom/client/validateDOMNesting.js index 60978e0338..7f6c49fa18 100644 --- a/src/renderers/dom/client/validateDOMNesting.js +++ b/src/renderers/dom/client/validateDOMNesting.js @@ -63,7 +63,7 @@ if (__DEV__) { ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; var emptyAncestorInfo = { - parentTag: null, + current: null, formTag: null, aTagInScope: null, @@ -98,7 +98,7 @@ if (__DEV__) { ancestorInfo.dlItemTagAutoclosing = null; } - ancestorInfo.parentTag = info; + ancestorInfo.current = info; if (tag === 'form') { ancestorInfo.formTag = info; @@ -323,7 +323,7 @@ if (__DEV__) { validateDOMNesting = function(childTag, childInstance, ancestorInfo) { ancestorInfo = ancestorInfo || emptyAncestorInfo; - var parentInfo = ancestorInfo.parentTag; + var parentInfo = ancestorInfo.current; var parentTag = parentInfo && parentInfo.tag; var invalidParent = @@ -420,7 +420,7 @@ if (__DEV__) { // For testing validateDOMNesting.isTagValidInContext = function(tag, ancestorInfo) { ancestorInfo = ancestorInfo || emptyAncestorInfo; - var parentInfo = ancestorInfo.parentTag; + var parentInfo = ancestorInfo.current; var parentTag = parentInfo && parentInfo.tag; return ( isTagValidWithParent(tag, parentTag) &&