From 7df9ccf425f05d0bd945295f1c2f3f245dea6211 Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Tue, 7 Nov 2017 23:58:28 +0530 Subject: [PATCH] Add listFile directory if doens't exist --- utils/listFile.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/listFile.js b/utils/listFile.js index 814ec2a..c278460 100644 --- a/utils/listFile.js +++ b/utils/listFile.js @@ -27,8 +27,6 @@ function appendToList(domain, outPort, inPort) { "inPort": inPort } } - - jsonFile = {} if (fs.existsSync(listFilePath)) { jsonFile = fs.readFileSync(listFilePath); @@ -45,7 +43,6 @@ function appendToList(domain, outPort, inPort) { jsonFile = beautifyJSON(jsonFile, null, 2, 30); } else { - jsonFile = {} jsonFile[domain] = domBlock; jsonFile = beautifyJSON(jsonFile); }