From 67c9c8597c78f8aa36ae31aa2c41422e677a65d8 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Fri, 2 Sep 2022 08:08:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E7=BB=91=E5=AE=9Acookies=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/gsCfg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/gsCfg.js b/model/gsCfg.js index 4949594..a356a8a 100644 --- a/model/gsCfg.js +++ b/model/gsCfg.js @@ -152,7 +152,7 @@ class GsCfg { let ck = fs.readFileSync(file, 'utf-8') let yaml = YAML.stringify(data) ck = YAML.parse(ck) - if (ck?.uid) { + if (ck?.uid||!ck) { fs.writeFileSync(file, yaml, 'utf8') } else { if(!ck[Object.keys(data)[0]]){