Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
binding voilations check during es2015 transform[fix #630]
Browse files Browse the repository at this point in the history
vigneshshanmugam committed Jul 14, 2017
1 parent 432c858 commit 9fb33ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/babel-plugin-transform-remove-undefined/src/index.js
Original file line number Diff line number Diff line change
@@ -60,6 +60,10 @@ function hasViolation(declarator, scope, start) {
const scopeParent = declarator.getFunctionParent();

const violation = binding.constantViolations.some(v => {
// https://github.com/babel/babili/issues/630
if (!v.node) {
return false;
}
// return 'true' if we cannot guarantee the violation references
// the initialized identifier after
const violationStart = v.node.start;

0 comments on commit 9fb33ef

Please sign in to comment.