From 8cbaf4e3e13ffac21f47ebb111e62118df61441b Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 27 Mar 2015 12:33:07 -0700 Subject: [PATCH] Don't try to uglify on the client Follow-up to 36ff10c08. Note that 696ce39c101 made tests fail, because it used minifiers on the client for the first time, which hit this edge case. If you are hitting this issue in your own app because you are using SpacebarsCompiler on the client and loading minifiers, you can work around it for now by putting this somewhere: Package.minifiers.UglifyJSMinify = function (code) { return { code: code }; }; --- packages/spacebars-compiler/compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/spacebars-compiler/compiler.js b/packages/spacebars-compiler/compiler.js index dc859be64a..b325735ed4 100644 --- a/packages/spacebars-compiler/compiler.js +++ b/packages/spacebars-compiler/compiler.js @@ -90,7 +90,7 @@ SpacebarsCompiler.codeGen = function (parseTree, options) { }; SpacebarsCompiler._beautify = function (code) { - if (Package.minifiers) { + if (Package.minifiers && Package.minifiers.UglifyJSMinify) { var result = Package.minifiers.UglifyJSMinify( code, { fromString: true,