Skip to content

Commit 233cf64

Browse files
authored
Merge pull request #27 from Jhn-k/master
changed path to config.json in Chat.js handleWriteToConfig
2 parents 3b262f9 + a677341 commit 233cf64

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/components/Chat.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ function () {
760760
}, {
761761
key: "handleWriteToConfig",
762762
value: function handleWriteToConfig() {
763-
_fs.default.writeFile('"../../config.json', JSON.stringify(_config.default, null, 4), function (err) {
763+
_fs.default.writeFile("".concat(__dirname, "/../../config.json"), JSON.stringify(_config.default, null, 4), function (err) {
764764
if (err) log.error(err);
765765
});
766766
}

src/components/Chat.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,8 @@ class Chat {
547547
}
548548

549549
handleWriteToConfig() {
550-
fs.writeFile('"../../config.json', JSON.stringify(config, null, 4), err => {
550+
fs.writeFile('config.json', JSON.stringify(config, null, 4), err => {
551+
fs.writeFile(`${__dirname}/../../config.json`, JSON.stringify(config, null, 4), (err) => {
551552
if (err) log.error(err);
552553
});
553554
}

0 commit comments

Comments
 (0)