Skip to content

Fix for minification problem with Handlebars.

Robert Sinton requested to merge hotifx/handlebars_minif into versions/0.16.3

Minification issue - although we were specifying a pre-minified version of handlebars to use, it was then getting further minified.

Our minification introduced a JS ambiguity that Chrome and Firefox choke on: this line…

varDeclarations += ', alias' + ++aliasCount + '=' + alias;

gets minified to…

varDeclarations+=', alias'+++aliasCount+'='+alias;

… and it's the run of three "+"s that is the problem. (Curiously Safari didn't seem to mind, but who knows what it did with it!)

With this change the handlebars.min.js file is incorporated into the JS cache file without further minification.

Merge request reports