From 24366d89a3135a89b4e0d6f738997237a5760b6e Mon Sep 17 00:00:00 2001 From: Alexander Trofimov Date: Thu, 31 Mar 2016 12:45:24 +0300 Subject: [PATCH] Fix extraCommandArgs not being copied Fix extraCommandArgs not being copied https://github.com/ChadKillingsworth/closure-compiler-npm/issues/18 --- lib/node/closure-compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node/closure-compiler.js b/lib/node/closure-compiler.js index bec36c88..379253bd 100644 --- a/lib/node/closure-compiler.js +++ b/lib/node/closure-compiler.js @@ -34,7 +34,7 @@ var contribPath = path.dirname(compilerPath) + '/contrib'; * @param {Array=} extraCommandArgs */ function Compiler(args, extraCommandArgs) { - this.commandArguments = extraCommandArgs || []; + this.commandArguments = (extraCommandArgs || []).slice(); this.commandArguments.push('-jar', Compiler.JAR_PATH);