lint
This commit is contained in:
parent
ac0910f343
commit
dff470164c
@ -144,6 +144,8 @@ if (typeof window.graphDataIndex !== 'undefined') {
|
||||
|
||||
// Notes graph
|
||||
|
||||
const d3 = window.d3
|
||||
|
||||
if (typeof window.graphData !== 'undefined') {
|
||||
const MINIMAL_NODE_SIZE = 10
|
||||
const MAX_NODE_SIZE = 16
|
||||
@ -403,14 +405,14 @@ const conditionsContainer = document.getElementById('gardenConditions')
|
||||
const openWeatherUrl = 'https://garden-weather-api.vercel.app/weather/toronto'
|
||||
|
||||
async function fetchWeather () {
|
||||
let response = await window.fetch(openWeatherUrl)
|
||||
let weatherData = await response.json()
|
||||
const response = await window.fetch(openWeatherUrl)
|
||||
const weatherData = await response.json()
|
||||
conditionsContainer.innerHTML = `${capitalize(weatherData.weather[0].description)}, ${Math.round(weatherData.main.temp)}°C`
|
||||
conditionsContainer.classList.remove('dn')
|
||||
}
|
||||
|
||||
if (conditionsContainer) {
|
||||
fetchWeather().catch(e => {
|
||||
console.log('There has been a problem with getting the weather ' + e.message);
|
||||
});
|
||||
console.log('There has been a problem with getting the weather ' + e.message)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user