*Update dist

This commit is contained in:
Derrick Hammer 2022-12-06 16:48:52 -05:00
parent 6e37b22988
commit 8e5b9d2bc6
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 3 deletions

7
dist/index.js vendored
View File

@ -134,9 +134,10 @@ class Config {
saveConfigJson(file, data) { saveConfigJson(file, data) {
(0, bsert_1.default)(typeof data === "object"); (0, bsert_1.default)(typeof data === "object");
(0, bsert_1.default)(!Array.isArray(data)); (0, bsert_1.default)(!Array.isArray(data));
const fullPath = path_1.default.join(this.str("configdir"), file); const configDir = this.str("configdir");
if (!fs_1.default.existsSync(fullPath)) { const fullPath = path_1.default.join(configDir, file);
fs_1.default.mkdirSync(fullPath, { recursive: true }); if (!fs_1.default.existsSync(configDir)) {
fs_1.default.mkdirSync(configDir, { recursive: true });
} }
fs_1.default.writeFileSync(fullPath, JSON.stringify(data)); fs_1.default.writeFileSync(fullPath, JSON.stringify(data));
this.openJson(fullPath); this.openJson(fullPath);