Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 4b0d3a2

Browse files
sebmarkbagesophiebits
authored andcommitted
Check for the explicit isTopLevelWrapper flag instead of flaky feature test (#407)
I added this in facebook/react#7164
1 parent 18bbe55 commit 4b0d3a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backend/getData.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ function getData(element: Object): DataType {
7373
name = element.getName();
7474
// 0.14 top-level wrapper
7575
// TODO(jared): The backend should just act as if these don't exist.
76-
if (element._renderedComponent && element._currentElement.props === element._renderedComponent._currentElement) {
76+
if (element._renderedComponent && (
77+
element._currentElement.props === element._renderedComponent._currentElement ||
78+
element._currentElement.type.isReactTopLevelWrapper
79+
)) {
7780
nodeType = 'Wrapper';
7881
}
7982
if (name === null) {

0 commit comments

Comments
 (0)