From 2b8e45e2bdea41452ddc17e1d35dd26040e424a5 Mon Sep 17 00:00:00 2001 From: muxator Date: Wed, 31 Oct 2018 23:22:50 +0100 Subject: [PATCH] ImportHandler: anticipated the error checking No functional changes. --- src/node/handler/ImportHandler.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index 16823a36..02975e2b 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -205,11 +205,14 @@ exports.doImport = function(req, res, padId) break; } } - if (isAscii) { - callback(); - } else { + + if (!isAscii) { callback("uploadFailed"); + + return; } + + callback(); }); },