This commit is contained in:
powermaker450 2024-07-03 23:56:43 -04:00
parent 0e70a0d57a
commit 96ff85ab80

View file

@ -27,11 +27,7 @@ export function checkFile(
if (fs.existsSync(file)) { if (fs.existsSync(file)) {
const data = fs.readFileSync(file, encoding); const data = fs.readFileSync(file, encoding);
final = final = !data.toString().trim() ? generic : JSON.parse(data.toString());
data.toString().trim() === ""
? generic
: // @ts-ignore
JSON.parse(data);
} else { } else {
fs.createWriteStream(file); fs.createWriteStream(file);
final = generic; final = generic;