aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/ast.js b/lib/ast.js
index 3c6672c2..5fe6efc1 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -1176,15 +1176,7 @@ var AST_ExportDefault = DEFNODE("ExportDefault", "body", {
});
},
_validate: function() {
- if (this.body instanceof AST_Class && this.body.name) {
- if (!(this.body instanceof AST_DefClass)) {
- throw new Error("body must be AST_DefClass when named");
- }
- } else if (this.body instanceof AST_Lambda && this.body.name) {
- if (!(this.body instanceof AST_LambdaDefinition)) {
- throw new Error("body must be AST_LambdaDefinition when named");
- }
- } else {
+ if (!(this.body instanceof AST_DefClass || this.body instanceof AST_LambdaDefinition)) {
must_be_expression(this, "body");
}
},