From fa82161a4cef2e30ee67e84c1cfe1d3ca7312b94 Mon Sep 17 00:00:00 2001 From: eleith Date: Thu, 24 Oct 2013 00:42:19 -0700 Subject: [PATCH] bug --- tools/node.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/node.js b/tools/node.js index 89f7f246..09d1ecaf 100644 --- a/tools/node.js +++ b/tools/node.js @@ -63,10 +63,7 @@ exports.minify = function(files, options) { }); if (typeof files == "string") { files = [ files ]; - - if (options.fromFile !== null) { - option.fromFile = [options.fromFile]; - } + options.fromFile = options.fromFile ? [options.fromFile] : ["?"] } UglifyJS.base54.reset(); @@ -78,7 +75,7 @@ exports.minify = function(files, options) { ? file : fs.readFileSync(file, "utf8"); toplevel = UglifyJS.parse(code, { - filename: options.fromString ? options.fromFile[index] || "?" : file, + filename: options.fromString ? options.fromFile[index] : file, toplevel: toplevel }); });