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