Fix PathHoister hoisting before a same-scope variable declaration.

Seems we didn't have tests running for this very simple case.

Also fixes #5520
This commit is contained in:
Samuel Reed
2017-05-01 15:22:26 -05:00
committed by Logan Smyth
parent 526a7d20ef
commit c307bbb3a9
8 changed files with 59 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
function fn(Component) {
var data = "prop";
return () => <Component prop={data} />;
}

View File

@@ -0,0 +1,7 @@
function fn(Component) {
var data = "prop",
_ref = <Component prop={data} />;
return () => _ref;
}