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:
@@ -0,0 +1,10 @@
|
||||
function render() {
|
||||
const nodes = [];
|
||||
|
||||
for(let i = 0; i < 5; i++) {
|
||||
nodes.push(<div>{i}</div>)
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
function render() {
|
||||
const nodes = [];
|
||||
|
||||
for (let i = 0; i < 5; i++) {
|
||||
nodes.push(<div>{i}</div>);
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user