From 2814511bbbd86f02379d998879b723f2053e7878 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Tue, 4 Aug 2026 14:55:48 +0530 Subject: [PATCH] fix: resolve 4 bugs in termui --- examples/chat-app/src/index.tsx | 2 +- examples/widget-gallery/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/examples/widget-gallery/src/index.ts b/examples/widget-gallery/src/index.ts index 57b141244..ec688a7fc 100644 --- a/examples/widget-gallery/src/index.ts +++ b/examples/widget-gallery/src/index.ts @@ -129,7 +129,7 @@ class WidgetGalleryApp extends Widget { } // Tab switching: 1-6 - const num = parseInt(event.key); + const num = parseInt(event.key, 10); if (num >= 1 && num <= 6) { this._switchTab(num - 1); return true;