From 158f395d4b017dfcfafb9ebf543b0a499cdb8f10 Mon Sep 17 00:00:00 2001 From: Tweak Date: Sun, 6 Nov 2022 15:36:51 -0700 Subject: [PATCH] Update getJSON.js --- utils/getJSON.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/utils/getJSON.js b/utils/getJSON.js index c096a67..9c3b224 100644 --- a/utils/getJSON.js +++ b/utils/getJSON.js @@ -1,5 +1,4 @@ const fs = require('fs'); -const invalidDomains = require('./invalid-domains.json'); function getFileExtension(filename) { return (/[.]/.exec(filename)) ? /[^.]+$/.exec(filename) : undefined; @@ -11,11 +10,7 @@ function getJSON(file, filename) { if (!ext) return false; // If no file extension, return. if (ext != 'json') return false; // If file extension is not '.json' return. - - invalidDomains.forEach(domain => { - if (filename === domain) return false; - }) - + try { if (fs.existsSync(path)) { // Check if file exists in domain directory // It exists