Skip to content

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

Merged
boopathi merged 4 commits intobabel:masterfrom
postspectacular:remove-strict-fix
Jun 27, 2017
Merged

fix(minify-dead-code): fix #601#602
boopathi merged 4 commits intobabel:masterfrom
postspectacular:remove-strict-fix

Conversation

@postspectacular
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Can you also add a test case for this ?

@postspectacular
Copy link
Copy Markdown
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
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.

3 participants