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(minify-dead-code): fix #601 #602

Merged
merged 4 commits into from
Jun 27, 2017
Merged

fix(minify-dead-code): fix #601 #602

merged 4 commits into from
Jun 27, 2017

Conversation

postspectacular
Copy link
Contributor

  • add block checks to getUseStrictDirectives()

return block.get("directives").filter(directive => {
return directive.node.value.value === useStrict;
});
var dir = block.get("directives");
Copy link
Member

Choose a reason for hiding this comment

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

why not check for array? Array.isArray()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@boopathi
Copy link
Member

Can you also add a test case for this ?

@postspectacular
Copy link
Contributor Author

@boopathi there already is a test for this. I still don't know how to produce a minimal example of the case triggering the original error. The existing test does succeed for the fix, though and the fix also allows me to process my project codebase now...

@boopathi boopathi merged commit 72c2cac into babel:master Jun 27, 2017
@postspectacular postspectacular deleted the remove-strict-fix branch July 1, 2017 10:36
@boopathi boopathi added the Tag: Bug Fix Pull Request fixes a bug label Jul 8, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Tag: Bug Fix Pull Request fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants