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
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.20.3",
"version": "2.20.4",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+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'))) {