diff --git a/download.js b/download.js index e56e58710c..1a1da4007e 100644 --- a/download.js +++ b/download.js @@ -448,7 +448,7 @@ function buildCode(promises) { if(i < l) { var p = promises[i]; p.contentsPromise.then(function(contents) { - code[p.type] += contents + (p.type === 'js'? ';' : '') + '\n'; + code[p.type] += contents + (p.type === 'js' && !/;\s*$/.test(contents) ? ';' : '') + '\n'; i++; f(resolve); });