Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

options.defines is optional..

  • Loading branch information...
commit a3034766dfef422103b791c1f0f8571aee6dd1b8 1 parent 5bedabe
@mishoo mishoo authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 lib/process.js
View
16 lib/process.js
@@ -468,14 +468,16 @@ function ast_mangle(ast, options) {
};
function get_define(name) {
- // we always lookup a defined symbol for the current scope FIRST, so declared
- // vars trump a DEFINE symbol, but if no such var is found, then match a DEFINE value
- if (!scope.has(name)) {
- if (HOP(options.defines, name)) {
- return options.defines[name];
- }
+ if (options.defines) {
+ // we always lookup a defined symbol for the current scope FIRST, so declared
+ // vars trump a DEFINE symbol, but if no such var is found, then match a DEFINE value
+ if (!scope.has(name)) {
+ if (HOP(options.defines, name)) {
+ return options.defines[name];
+ }
+ }
+ return null;
}
- return null;
};
function _lambda(name, args, body) {
Please sign in to comment.
Something went wrong with that request. Please try again.