From ac953edbca1e2d870622d870275b687fb5715e6b Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Sun, 2 Aug 2026 17:33:27 +0530 Subject: [PATCH 1/2] fix: code quality and safety improvements --- js/geolocation.js | 2 +- js/invoice.js | 2 +- js/recommendations.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/geolocation.js b/js/geolocation.js index 5413de1..ef5366b 100644 --- a/js/geolocation.js +++ b/js/geolocation.js @@ -80,7 +80,7 @@ function showManualLocationInput(callback) { const parsedLat = parseFloat(lat); const parsedLon = parseFloat(lon); - if (isNaN(parsedLat) || isNaN(parsedLon)) { + if (Number.isNaN(parsedLat) || Number.isNaN(parsedLon)) { alert("❌ Invalid coordinates. Please enter valid numbers."); showManualLocationInput(callback); return; diff --git a/js/invoice.js b/js/invoice.js index 162fdc1..6bc728e 100644 --- a/js/invoice.js +++ b/js/invoice.js @@ -268,7 +268,7 @@ window.invoiceGenerator = (() => { `; }); - printContainer.innerHTML = ` + printContainer.textContent = `