diff options
Diffstat (limited to 'node_modules/babel-traverse/lib/path/inference/inferer-reference.js')
-rw-r--r-- | node_modules/babel-traverse/lib/path/inference/inferer-reference.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/node_modules/babel-traverse/lib/path/inference/inferer-reference.js b/node_modules/babel-traverse/lib/path/inference/inferer-reference.js index 22ab3053a..3a8ff31e6 100644 --- a/node_modules/babel-traverse/lib/path/inference/inferer-reference.js +++ b/node_modules/babel-traverse/lib/path/inference/inferer-reference.js @@ -44,15 +44,13 @@ function getTypeAnnotationBindingConstantViolations(path, name) { var testType = getConditionalAnnotation(path, name); if (testType) { - (function () { - var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); + var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); - constantViolations = constantViolations.filter(function (path) { - return testConstantViolations.indexOf(path) < 0; - }); + constantViolations = constantViolations.filter(function (path) { + return testConstantViolations.indexOf(path) < 0; + }); - types.push(testType.typeAnnotation); - })(); + types.push(testType.typeAnnotation); } if (constantViolations.length) { |