Previously we saw a bug that when we have nested if statements and an alternate then the generated code may confuse which if statement the alternate belongs to. e.g. ``` if (foo) if (bar) bar(); else baz(); ``` But this was handled by looking at the consequent and if it's an if we add a block. However we didn't handle situations where it's not an if but the last recursive statement is an if: ``` if (foo) while (bar) if (baz) baz(); else shoosh() ``` This handles it by recurring until we get the last statement.
The compiler for writing next generation JavaScript.
Looking for support?
For questions and support please visit the discussion forum, Slack community, or StackOverflow.
Want to report a bug or request a feature?
Bugs and feature requests should be posted at phabricator.babeljs.io.
Want to report an issue with babeljs.io?
For documentation and website issues please visit the babel.github.io repo.
Description
Languages
JavaScript
99.5%
Makefile
0.3%
HTML
0.1%