Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

options.defines is optional..

  • Loading branch information...
commit a3034766dfef422103b791c1f0f8571aee6dd1b8 1 parent 5bedabe
Mihai Bazon authored

Showing 1 changed file with 9 additions and 7 deletions. Show diff stats Hide diff stats

  1. +9 7 lib/process.js
16 lib/process.js
@@ -468,14 +468,16 @@ function ast_mangle(ast, options) {
468 468 };
469 469
470 470 function get_define(name) {
471   - // we always lookup a defined symbol for the current scope FIRST, so declared
472   - // vars trump a DEFINE symbol, but if no such var is found, then match a DEFINE value
473   - if (!scope.has(name)) {
474   - if (HOP(options.defines, name)) {
475   - return options.defines[name];
476   - }
  471 + if (options.defines) {
  472 + // we always lookup a defined symbol for the current scope FIRST, so declared
  473 + // vars trump a DEFINE symbol, but if no such var is found, then match a DEFINE value
  474 + if (!scope.has(name)) {
  475 + if (HOP(options.defines, name)) {
  476 + return options.defines[name];
  477 + }
  478 + }
  479 + return null;
477 480 }
478   - return null;
479 481 };
480 482
481 483 function _lambda(name, args, body) {

0 comments on commit a303476

Please sign in to comment.
Something went wrong with that request. Please try again.