From 41a20bddbe25cdf4bf4cb22d0f976dd63bebc8a7 Mon Sep 17 00:00:00 2001 From: panda Date: Tue, 11 Apr 2023 16:48:59 +0800 Subject: [PATCH] ui: fix auto subtask (#557) --- packages/ui-default/pages/problem_config.page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui-default/pages/problem_config.page.tsx b/packages/ui-default/pages/problem_config.page.tsx index dac783dee..431894f6a 100644 --- a/packages/ui-default/pages/problem_config.page.tsx +++ b/packages/ui-default/pages/problem_config.page.tsx @@ -113,7 +113,7 @@ const page = new NamedPage('problem_config', () => { delete state.config.cases; delete state.config.score; } - if (state.config.subtasks) return; + if (state.config.subtasks?.length) return; const testdata = (state.testdata || []).map((i) => i.name); unsubscribe(); const subtasks = readSubtasksFromFiles(testdata, state.config);