summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-09-28 14:05:59 +0100
committerJohn McLear <john@mclear.co.uk>2014-09-28 14:05:59 +0100
commitd25d81b9e2bfca3fe80f2d1ceb5367c5244556f9 (patch)
treefc0f34cf21729cbdf2318de4033e0722214b9cca
parent2e6348b8aa7f02c9fd5203f5e90feb148e47661f (diff)
parentbfde869948ecd7a40f99467831caaa22877d3dec (diff)
downloadetherpad-lite-d25d81b9e2bfca3fe80f2d1ceb5367c5244556f9.zip
Merge pull request #2252 from otetard/bugfix/fix_export_filename
If exportFileName hook isn’t defined don’t return empty filename.
-rw-r--r--src/node/handler/ExportHandler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/handler/ExportHandler.js b/src/node/handler/ExportHandler.js
index a748d3f2..5bedcce2 100644
--- a/src/node/handler/ExportHandler.js
+++ b/src/node/handler/ExportHandler.js
@@ -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