2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 19:10:53 +08:00

修正第一次绑定cookies报错问题

This commit is contained in:
Ctrlcvs 2022-09-02 08:08:23 +08:00
parent c24fbe82fe
commit 67c9c8597c

View File

@ -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]]){