mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
修正第一次绑定cookies报错问题
This commit is contained in:
parent
c24fbe82fe
commit
67c9c8597c
@ -152,7 +152,7 @@ class GsCfg {
|
|||||||
let ck = fs.readFileSync(file, 'utf-8')
|
let ck = fs.readFileSync(file, 'utf-8')
|
||||||
let yaml = YAML.stringify(data)
|
let yaml = YAML.stringify(data)
|
||||||
ck = YAML.parse(ck)
|
ck = YAML.parse(ck)
|
||||||
if (ck?.uid) {
|
if (ck?.uid||!ck) {
|
||||||
fs.writeFileSync(file, yaml, 'utf8')
|
fs.writeFileSync(file, yaml, 'utf8')
|
||||||
} else {
|
} else {
|
||||||
if(!ck[Object.keys(data)[0]]){
|
if(!ck[Object.keys(data)[0]]){
|
||||||
|
Loading…
Reference in New Issue
Block a user