Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PathHoister hoisting JSX member expressions on "this". #5143

Merged
merged 1 commit into from Feb 13, 2017

Commits on Jan 16, 2017

  1. Fix PathHoister hoisting JSX member expressions on "this".

    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 babel#4397 and is an alternative to babel#4787.
    STRML committed Jan 16, 2017
    Copy the full SHA
    8724135 View commit details
    Browse the repository at this point in the history