Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/ui/src/Form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,5 @@ export class Form extends Widget {
}
}
}

.catch(err => console.error("Promise.all failed:", err));
Comment on lines +141 to +142

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Attach the rejection handler inside submit().

submit() ends at Line 98, so the leading .catch(...) at Line 141 is a standalone expression. This causes the parse error reported by Biome.

Wrap the await Promise.all(validationPromises) call in try/catch, or chain .catch(...) directly on that expression. On rejection, reset _isValidating, call markDirty(), and stop submission. Do not continue to _onSubmit after validation fails.

🧰 Tools
🪛 Biome (2.5.6)

[error] 142-142: Expected a statement but instead found '.catch(err => console.error("Promise.all failed:", err))'.

(parse)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ui/src/Form.ts` around lines 141 - 142, Move the rejection handling
into submit() by wrapping the await Promise.all(validationPromises) call in
try/catch or chaining catch directly to it. On validation failure, reset
_isValidating, call markDirty(), and return before reaching _onSubmit; remove
the standalone catch expression.

Source: Linters/SAST tools

Loading