diff --git a/examples/calculator/src/index.tsx b/examples/calculator/src/index.tsx index 852911990..328248060 100644 --- a/examples/calculator/src/index.tsx +++ b/examples/calculator/src/index.tsx @@ -85,7 +85,7 @@ function safeEval(expr: string): string { if (tokens.length === 0) return '0'; // Handle initial negative number - if (tokens[0] === '-' && tokens.length > 1 && !isNaN(Number(tokens[1]))) { + if (tokens[0] === '-' && tokens.length > 1 && !Number.isNaN(Number(tokens[1]))) { tokens.splice(0, 2, '-' + tokens[1]); } 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/weather/src/index.tsx b/examples/weather/src/index.tsx index dce3c7425..2dcf862ec 100644 --- a/examples/weather/src/index.tsx +++ b/examples/weather/src/index.tsx @@ -201,7 +201,7 @@ async function fetchWeather() { } } -setInterval(fetchWeather, 5000); +clearInterval(window.__interval); window.__interval = setInterval(fetchWeather, 5000); fetchWeather(); // Gauge does not expose a public setColor() method, so dynamic color