From 3ba9be2925b41198008aa3d3d2d82b5214a18c88 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 21 Oct 2020 11:46:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=86=99?= =?UTF-8?q?=E9=94=81?= 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 188ecfde..0eb2a4ba 100644 --- a/_server/editor_config.js +++ b/_server/editor_config.js @@ -32,11 +32,11 @@ editor_config.prototype.save = function(callback) { if (this._isWriting) return; try { this._isWriting = true; - fs.writeFile(this.address, JSON.stringify(this.config) ,'utf-8', function(e) { + fs.writeFile(this.address, JSON.stringify(this.config) ,'utf-8', (function(e) { this._isWriting = false; if (e) console.error("写入配置文件失败"); if (callback instanceof Function) callback(); - }) + }).bind(this)) } catch (e) { this._isWriting = false; console.error(e);