Skip to content

Commit

Permalink
changed city name to start with upper case in currency exchange js
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinasiwko committed Jan 24, 2024
1 parent 0e14696 commit 9d09c21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/currency_exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9d09c21

Please sign in to comment.