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: Make babel-plugin-minify-infinity work again. (#839) #840

Closed
wants to merge 1 commit into from

Conversation

Cyp
Copy link

@Cyp Cyp commented May 14, 2018

Here's an attempt at fixing #839. I don't know whether there are any other cases that need catching.

@Cyp Cyp requested a review from boopathi as a code owner May 14, 2018 09:09
@@ -6,6 +6,12 @@ module.exports = function({ types: t }) {
t.numericLiteral(1),
t.numericLiteral(0)
);
const badTransforms = {
ArrayPattern: true,
AssignmentExpression: true,
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this prevent transforming x = Infinity?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I missed testing that case.

@boopathi
Copy link
Member

Ah!. I worked on the same thing and have #841 .

@boopathi boopathi added the Tag: Bug Fix Pull Request fixes a bug label May 14, 2018
@Cyp
Copy link
Author

Cyp commented May 14, 2018

Don't know if it's the right approach, but I've updated my version in case.

@vigneshshanmugam
Copy link
Member

Thanks for the PR @Cyp

Fixed by #841

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tag: Bug Fix Pull Request fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants