From c60ae14ae2447ea25c8f20d1326ccecafbbe05a8 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 3 Jun 2020 21:05:38 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20v2.7=20=E5=B7=A5=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/editor_config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_server/editor_config.js b/_server/editor_config.js index bf0dd074..497c246e 100644 --- a/_server/editor_config.js +++ b/_server/editor_config.js @@ -6,7 +6,7 @@ editor_config.prototype.load = function(callback) { var _this = this; fs.readFile(this.address, "utf-8", function(e, d) { if (e) { - console.warn("无法读取配置文件, 已重新生成"); + console.error("无法读取配置文件, 已重新生成"); _this.config = {}; _this.save(callback); } else { @@ -28,7 +28,7 @@ editor_config.prototype.set = function(key, value, callback) { editor_config.prototype.save = function(callback) { fs.writeFile(this.address, JSON.stringify(this.config) ,'utf-8', function(e) { - if (e) printe("写入配置文件失败"); + if (e) console.error("写入配置文件失败"); if (callback instanceof Function) callback(); }) }