We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Input:
foo = (bar.baz || '').length;
Output with minify-guarded-expressions enabled:
minify-guarded-expressions
foo = bar.baz.length;
The problem is that bar.baz can be undefined, so bar.baz.length will throw an error.
bar.baz
bar.baz.length
For some reason I can't reproduce it on the REPL page, but it is reproducible via CLI: babel --plugins=minify-guarded-expressions
babel --plugins=minify-guarded-expressions
The text was updated successfully, but these errors were encountered:
Related: #171
Sorry, something went wrong.
Fix guarded expressions being utilized elsewhere
443d9bf
+ (Close #171) + (close #174) + (close #176)
Fix guarded expressions being utilized elsewhere (#179)
11664eb
Successfully merging a pull request may close this issue.
Input:
Output with
minify-guarded-expressions
enabled:The problem is that
bar.baz
can be undefined, sobar.baz.length
will throw an error.For some reason I can't reproduce it on the REPL page, but it is reproducible via CLI:
babel --plugins=minify-guarded-expressions
The text was updated successfully, but these errors were encountered: