From 9a38a597e5923ea9c1ce23fc4bcf3e454cebbca6 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Mon, 30 Dec 2024 18:06:18 +0000 Subject: [PATCH] Remove N/A hack from json-file-fix and format file --- json-file-fix.mjs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/json-file-fix.mjs b/json-file-fix.mjs index 4acd363b..12351043 100644 --- a/json-file-fix.mjs +++ b/json-file-fix.mjs @@ -37,13 +37,8 @@ fs.readdirSync(arg, { recursive: true, withFileTypes: true }).forEach(file => { return; } - if (errorObject["short_description"] === "N/A") errorObject["short_description"] = "Unknown cause."; - if (errorObject["long_description"] === "N/A") errorObject["long_description"] = "Unknown cause."; - if (errorObject["short_solution"] === "N/A") errorObject["short_solution"] = "Unknown solution."; - if (errorObject["long_solution"] === "N/A") errorObject["long_solution"] = "Unknown solution."; - - const { - short_description, + const { + short_description, long_description, short_solution, long_solution, @@ -72,5 +67,5 @@ fs.readdirSync(arg, { recursive: true, withFileTypes: true }).forEach(file => { } }); - fs.writeFileSync(fullPath, JSON.stringify(json, null, "\t")); + fs.writeFileSync(fullPath, JSON.stringify(json, null, "\t")); }); \ No newline at end of file