From 9d09c21e3db9466d9d5910b14b45f0032b58a4de Mon Sep 17 00:00:00 2001 From: Paulina Siwko Date: Wed, 24 Jan 2024 23:02:26 +0100 Subject: [PATCH] changed city name to start with upper case in currency exchange js --- assets/js/currency_exchange.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/currency_exchange.js b/assets/js/currency_exchange.js index 5dc919d..bca1fc3 100644 --- a/assets/js/currency_exchange.js +++ b/assets/js/currency_exchange.js @@ -296,7 +296,8 @@ async function initializeCurrencyExchange() { createUserCurrencySelector(); // Creating a currency selector const params = new URLSearchParams(window.location.search); - const city = params.get('city'); + let city = params.get('city'); + city = city.charAt(0).toUpperCase() + city.slice(1); if (!city) return; const countryName = await getCountryNameFromWeatherAPI(city);