From 38d72b12294cbded4b9a3cd232b386a54feffb73 Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Tue, 7 Nov 2017 23:31:55 +0530 Subject: [PATCH] Removed redundant initialization --- utils/listFile.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/utils/listFile.js b/utils/listFile.js index 4331a5e..cbd6770 100644 --- a/utils/listFile.js +++ b/utils/listFile.js @@ -24,8 +24,6 @@ function appendToList(domain, outPort, inPort) { "inPort": inPort } } - - jsonFile = {} if (fs.existsSync(listFilePath)) { jsonFile = fs.readFileSync(listFilePath); @@ -42,7 +40,6 @@ function appendToList(domain, outPort, inPort) { jsonFile = beautifyJSON(jsonFile, null, 2, 30); } else { - jsonFile = {} jsonFile[domain] = domBlock; jsonFile = beautifyJSON(jsonFile); } @@ -50,4 +47,4 @@ function appendToList(domain, outPort, inPort) { } -module.exports = appendToList; \ No newline at end of file +module.exports = appendToList;