From 6de82943dd8269b61fd4dcefb997a2363ea8f367 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Sun, 2 Aug 2026 17:29:48 +0530 Subject: [PATCH] fix: code quality and safety improvements --- themeAgent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themeAgent.js b/themeAgent.js index 064a0b1..4ffd928 100644 --- a/themeAgent.js +++ b/themeAgent.js @@ -16,7 +16,7 @@ class ThemeAgent { // Guard: Prevent invalid, negative, or tight-loop intervals (minimum 1 minute) let minutes = parseInt(config.checkIntervalMinutes, 10); - if (isNaN(minutes) || minutes < 1) { + if (Number.isNaN(minutes) || minutes < 1) { minutes = 30; // Safe default fallback } const intervalMs = minutes * 60 * 1000;