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)) {
const data = fs.readFileSync(file, encoding);
final =
data.toString().trim() === ""
? generic
: // @ts-ignore
JSON.parse(data);
final = !data.toString().trim() ? generic : JSON.parse(data.toString());
} else {
fs.createWriteStream(file);
final = generic;