diff --git a/examples/calculator/src/index.tsx b/examples/calculator/src/index.tsx index 852911990..a2ed8284b 100644 --- a/examples/calculator/src/index.tsx +++ b/examples/calculator/src/index.tsx @@ -403,7 +403,7 @@ class CalculatorApp extends Widget { } private evaluate() { - if (this.expression.trim() === "") return; + if (this.expression.trim().length === 0) return; const oldExpr = this.expression; this.result = safeEval(this.expression); if (this.result !== null && !this.result.startsWith("Error")) { diff --git a/examples/chat-app/src/index.tsx b/examples/chat-app/src/index.tsx index a3a2ddb14..0d405714e 100644 --- a/examples/chat-app/src/index.tsx +++ b/examples/chat-app/src/index.tsx @@ -257,7 +257,7 @@ function parseBlocks(text: string): Block[] { } // ── Handle Paragraphs ──────────────────────── - if (line.trim() === '') { + if (line.trim().length === 0) { blocks.push({ type: 'paragraph', text: '', diff --git a/packages/dev-server/src/server.ts b/packages/dev-server/src/server.ts index 47d4f2b6d..b31a4da89 100644 --- a/packages/dev-server/src/server.ts +++ b/packages/dev-server/src/server.ts @@ -380,7 +380,7 @@ export class DevServer { this._killChild(); - await exitedPromise.catch(() => {}); + await exitedPromise.catch( => console.error()); if (this._running && this._entryFile) { this._spawnChild(); diff --git a/packages/ui/src/Form.ts b/packages/ui/src/Form.ts index bf96ede6b..38d630037 100644 --- a/packages/ui/src/Form.ts +++ b/packages/ui/src/Form.ts @@ -138,3 +138,5 @@ export class Form extends Widget { } } } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file