Skip to content

Commit

Permalink
Check for the explicit isTopLevelWrapper flag instead of flaky featur…
Browse files Browse the repository at this point in the history
…e test

I added this in facebook/react#7164
  • Loading branch information
sebmarkbage committed Aug 9, 2016
1 parent 18bbe55 commit 351eb34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/getData.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ function getData(element: Object): DataType {
name = element.getName();
// 0.14 top-level wrapper
// TODO(jared): The backend should just act as if these don't exist.
if (element._renderedComponent && element._currentElement.props === element._renderedComponent._currentElement) {
if (element._renderedComponent && (
element._currentElement.props === element._renderedComponent._currentElement ||
element._currentElement.type.isReactTopLevelWrapper
)) {
nodeType = 'Wrapper';
}
if (name === null) {
Expand Down

0 comments on commit 351eb34

Please sign in to comment.