This repository has been archived on 2026-02-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Samuel Reed eb91bd831c Fix PathHoister hoisting JSX member expressions on "this". (#5143)
The PathHoister ignored member references on "this", causing it
to potentially hoist an expression above its function scope.

This patch tells the hoister to watch for "this", and if seen,
mark the nearest non-arrow function scope as the upper limit
for hoistng.

This fixes #4397 and is an alternative to #4787.
2017-02-12 18:34:07 -08:00

8 lines
104 B
JavaScript

function render() {
this.component = "div";
var _ref = <this.component />;
return () => _ref;
}