From 8e5b9d2bc6f258f435842d03ed7ad925ffb8e8c1 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 6 Dec 2022 16:48:52 -0500 Subject: [PATCH] *Update dist --- dist/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 021b132..b0f33db 100644 --- a/dist/index.js +++ b/dist/index.js @@ -134,9 +134,10 @@ class Config { saveConfigJson(file, data) { (0, bsert_1.default)(typeof data === "object"); (0, bsert_1.default)(!Array.isArray(data)); - const fullPath = path_1.default.join(this.str("configdir"), file); - if (!fs_1.default.existsSync(fullPath)) { - fs_1.default.mkdirSync(fullPath, { recursive: true }); + const configDir = this.str("configdir"); + const fullPath = path_1.default.join(configDir, file); + if (!fs_1.default.existsSync(configDir)) { + fs_1.default.mkdirSync(configDir, { recursive: true }); } fs_1.default.writeFileSync(fullPath, JSON.stringify(data)); this.openJson(fullPath);