mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: try to fix #121
This commit is contained in:
1 parent
d77d7d9ade
commit
00586b5883
8 files changed
+22
-13
No files matched your search
@@ -19,7 +19,7 @@ export async function parseConfig(config: string | ProblemConfig = {}) {
|
||||
timeMax: 0,
|
||||
};
|
||||
let cfg: ProblemConfig = {};
|
||||
if (typeof config === 'string' && config.length) {
|
||||
if (typeof config === 'string') {
|
||||
// TODO should validate here?
|
||||
cfg = await readYamlCases(load(config) as Record<string, any>);
|
||||
} else if (typeof config === 'object') cfg = await readYamlCases(config);
|
||||
|
||||
Reference in new issue
Block a user