add whitespace around defineArgs

This commit is contained in:
Sebastian McKenzie
2014-11-20 00:49:12 +11:00
parent aa7eb9c1c9
commit 638143700b

View File

@@ -30,9 +30,11 @@ AMDFormatter.prototype.transform = function (ast) {
params.unshift(t.identifier("exports"));
var container = t.functionExpression(null, params, t.blockStatement(body));
var defineArgs = [names, container];
var moduleName = this.getModuleName();
if (moduleName) defineArgs.unshift(t.literal(moduleName));
var call = t.callExpression(t.identifier("define"), defineArgs);
program.body = [t.expressionStatement(call)];