mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: problemconfig: bug fix
This commit is contained in:
3 files changed
+8
-3
No files matched your search
@@ -25,7 +25,7 @@ export default function reducer(state = {
|
||||
return { ...state, __valid: false, __errors: validate.errors.map((i) => `${i.instancePath}: ${i.message}`) };
|
||||
}
|
||||
const subtasks = (data as any).subtasks;
|
||||
for (const subtask of subtasks) {
|
||||
for (const subtask of subtasks || []) {
|
||||
if (typeof subtask.id !== 'number') {
|
||||
for (let i = 1; ; i++) {
|
||||
if (!subtasks.find((s) => s.id === i)) {
|
||||
|
||||
@@ -126,7 +126,7 @@ export function SubtaskSettings(props: SubtaskSettingsProps) {
|
||||
<span className="bp4-tree-node-caret-none bp4-icon-standard"></span>
|
||||
<span className="bp4-tree-node-label">{i18n('Scoring method')}</span>
|
||||
<span className="bp4-tree-node-secondary-label">
|
||||
<select value={ctype} onChange={(e) => setType(e.target.value)}>
|
||||
<select className="compact select" value={ctype} onChange={(e) => setType(e.target.value)}>
|
||||
<option value="min">Min</option>
|
||||
<option value="max">Max</option>
|
||||
<option value="sum">Sum</option>
|
||||
|
||||
Reference in new issue
Block a user