fix: Don't hoist JSX elements referencing mutable variables (#13054)

issue-13051

Co-authored-by: Clint Goodman <clintgoodman@workfront.com>
This commit is contained in:
Clint Goodman
2021-03-25 09:38:31 -06:00
committed by GitHub
parent 0067fd9e02
commit 266e07736e
6 changed files with 28 additions and 10 deletions

View File

@@ -0,0 +1,10 @@
function render() {
const nodes = [];
for(let i = 0; i < 5; i++) {
nodes.push(<div>{i}</div>)
}
return nodes;
}

View File

@@ -0,0 +1,10 @@
function render() {
const nodes = [];
for (let i = 0; i < 5; i++) {
nodes.push(<div>{i}</div>);
}
return nodes;
}