From be9ff4a0de3cb06a00bf2d6cb9900212c61a0b33 Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 22 Dec 2016 23:04:06 +0100 Subject: [PATCH] Fixed crash on invalid export url --- src/node/handler/ExportHandler.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/node/handler/ExportHandler.js b/src/node/handler/ExportHandler.js index fe7ab3db..678519fb 100644 --- a/src/node/handler/ExportHandler.js +++ b/src/node/handler/ExportHandler.js @@ -78,8 +78,9 @@ exports.doExport = function(req, res, padId, type) { exporttxt.getPadTXTDocument(padId, req.params.rev, function(err, txt) { - if(ERR(err)) return; - res.send(txt); + if(!err) { + res.send(txt); + } }); } else