judge: use config[key]

This commit is contained in:
undefined committed 2022-05-16 09:00:13 +08:00
1 parent a6c41ec39d
commit e3d61924ef
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ HOME=/w`,
};
export function getConfig(key: keyof typeof config) {
return global.Hydro ? global.Hydro.model.system.get(`hydrojudge.${key}`) : config[key];
return global.Hydro ? global.Hydro.model.system.get(`hydrojudge.${key}`) ?? config[key] : config[key];
}
if (fs.existsSync(path.resolve(process.cwd(), '.env'))) {