aboutsummaryrefslogtreecommitdiff
path: root/node_modules/babel-traverse/lib/path/replacement.js
diff options
context:
space:
mode:
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);
}
}