From 6727a77073826a122ffb4ba649043009b5950d2e Mon Sep 17 00:00:00 2001 From: muxator Date: Wed, 31 Oct 2018 22:55:58 +0100 Subject: [PATCH] ImportHandler: flatten code No functional changes --- src/node/handler/ImportHandler.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index dd37f6b17..c34debab1 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -141,14 +141,14 @@ exports.doImport = function(req, res, padId) if(headCount >= 10){ apiLogger.warn("Direct database Import attempt of a pad that already has content, we wont be doing this") return callback("padHasData"); - }else{ - fs.readFile(srcFile, "utf8", function(err, _text){ - directDatabaseAccess = true; - importEtherpad.setPadRaw(padId, _text, function(err){ - callback(); - }); + } + + fs.readFile(srcFile, "utf8", function(err, _text){ + directDatabaseAccess = true; + importEtherpad.setPadRaw(padId, _text, function(err){ + callback(); }); - } + }); }); }else{ callback();