10
lib/ast.js
10
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");
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user