aboutsummaryrefslogtreecommitdiff
path: root/node_modules/babel-traverse/lib/path/replacement.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-27 19:33:54 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-27 19:34:16 +0100
commit0e6de2c31dbf8c21277481f112e99c52b913940f (patch)
tree91789032de3b8eec9d789acd1323f25fc5d08422 /node_modules/babel-traverse/lib/path/replacement.js
parentceda0da31ad542c598c68146ae0712ca03df3d71 (diff)
node_modules
Diffstat (limited to 'node_modules/babel-traverse/lib/path/replacement.js')
-rw-r--r--node_modules/babel-traverse/lib/path/replacement.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/node_modules/babel-traverse/lib/path/replacement.js b/node_modules/babel-traverse/lib/path/replacement.js
index a60c73d54..411dacf3f 100644
--- a/node_modules/babel-traverse/lib/path/replacement.js
+++ b/node_modules/babel-traverse/lib/path/replacement.js
@@ -140,7 +140,7 @@ function replaceWith(replacement) {
}
if (this.isNodeType("Statement") && t.isExpression(replacement)) {
- if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
+ if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
replacement = t.expressionStatement(replacement);
}
}