Skip to content
New issue

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

Fix guarded expressions #179

Merged
merged 1 commit into from
Oct 5, 2016
Merged

Fix guarded expressions #179

merged 1 commit into from
Oct 5, 2016

Conversation

@kangax kangax merged commit 11664eb into master Oct 5, 2016
// the rightside of the expression;
// if the left side is evaluated to be deterministic,
// we can safely replace the entire expression
const shouldBail = !path.parentPath.isExpressionStatement();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this assumption doesn't have any corner cases that fail. Will add test cases once this seems to work out well for all corner cases.

@kangax
Copy link
Member

kangax commented Oct 5, 2016

Looks reasonable, thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants