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

Let path.remove() remove IfStatement.alternate #14833

Merged
merged 3 commits into from Aug 16, 2022

Commits on Aug 8, 2022

  1. Let path.remove() remove IfStatement.alternate

    Special-casing "consequent" makes sense, but there is no need to deviate from the normal `remove()` behavior for "alternate", which is permitted to be null.
    djpohly committed Aug 8, 2022
    Copy the full SHA
    e2456fc View commit details
    Browse the repository at this point in the history
  2. Add tests for path.remove() on IfStatement parts

    One test verifies the behavior fixed in babel#3583 (removing consequent
    does not make it null) and the other babel#14833 (removing alternate *does*
    make it null).
    djpohly committed Aug 8, 2022
    Copy the full SHA
    fb5539c View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2022

  1. Update packages/babel-traverse/test/removal.js

    Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
    nicolo-ribaudo and JLHwung committed Aug 16, 2022
    Copy the full SHA
    a6919a8 View commit details
    Browse the repository at this point in the history