Avoid using exports when they are not defined (like running in a browser).
This commit is contained in:
parent
7f8d72d9d3
commit
4bddd5c5a2
|
|
@ -81,7 +81,9 @@ function DEFNODE(type, props, methods, base) {
|
|||
ctor.DEFMETHOD = function(name, method) {
|
||||
this.prototype[name] = method;
|
||||
};
|
||||
exports["AST_" + type] = ctor;
|
||||
if (typeof exports !== "undefined") {
|
||||
exports["AST_" + type] = ctor;
|
||||
}
|
||||
return ctor;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user