diff --git a/www/printer.js b/www/printer.js index b3f6b02..0d802ab 100755 --- a/www/printer.js +++ b/www/printer.js @@ -80,13 +80,15 @@ exports.print = function (content, options, callback, scope) { return; } - if (typeof params == 'string') + if (typeof params == 'string') { params = { name: params }; + } params = this.mergeWithDefaults(params); - if ([null, undefined, ''].indexOf(params.name) > -1) + if ([null, undefined, ''].indexOf(params.name) > -1) { params.name = this.DEFAULT_DOC_NAME; + } exec(fn, null, 'Printer', 'print', [page, params]); };