Skip to content

Commit

Permalink
fixed uppercase function
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinasiwko committed Jan 24, 2024
1 parent 0d6c2b0 commit 9604717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/description.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ async function fetchWikipediaSummary(searchTerm, maxWords = 200) {

document.addEventListener('DOMContentLoaded', function() {
const params = new URLSearchParams(window.location.search);
const cityName = params.get('city');
let cityName = params.get('city');

cityName.charAt(0).toUpperCase() + cityName.slice(1);
cityName = cityName.charAt(0).toUpperCase() + cityName.slice(1);

if (cityName) {
fetchWikipediaSummary(cityName).then(summary => {
Expand Down

0 comments on commit 9604717

Please sign in to comment.