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:
@@ -0,0 +1,6 @@
|
||||
function fn(Component) {
|
||||
|
||||
var data = "prop";
|
||||
|
||||
return () => <Component prop={data} />;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
function fn(Component) {
|
||||
|
||||
var data = "prop",
|
||||
_ref = <Component prop={data} />;
|
||||
|
||||
return () => _ref;
|
||||
}
|
||||
Reference in New Issue
Block a user