From c8f2409de0f5937c81f63c0885a21a8e0c5fe504 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 17 Feb 2022 16:24:59 -0500 Subject: [PATCH] ImportHandler: Drop unnecessary underscores in variable names Also delete an unnecessary comment. --- src/node/handler/ImportHandler.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index 8cdc04f72..c77a46240 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -139,18 +139,15 @@ const doImport = async (req, res, padId) => { let directDatabaseAccess = false; if (fileIsEtherpad) { - // we do this here so we can see if the pad has quite a few edits - const _pad = await padManager.getPad(padId); - const headCount = _pad.head; - + const pad = await padManager.getPad(padId); + const headCount = pad.head; if (headCount >= 10) { logger.warn('Aborting direct database import attempt of a pad that already has content'); throw new ImportError('padHasData'); } - - const _text = await fs.readFile(srcFile, 'utf8'); + const text = await fs.readFile(srcFile, 'utf8'); directDatabaseAccess = true; - await importEtherpad.setPadRaw(padId, _text); + await importEtherpad.setPadRaw(padId, text); } // convert file to html if necessary