Merge pull request #2252 from otetard/bugfix/fix_export_filename

If exportFileName hook isn’t defined don’t return empty filename.
pull/2254/head
John McLear 2014-09-28 14:05:59 +01:00
commit d25d81b9e2
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ exports.doExport = function(req, res, padId, type)
hooks.aCallFirst("exportFileName", padId,
function(err, hookFileName){
// if fileName is set then set it to the padId, note that fileName is returned as an array.
if(hookFileName) fileName = hookFileName;
if(hookFileName.length) fileName = hookFileName;
//tell the browser that this is a downloadable file