From 9fce0ce5a5a2cce2d99c60cbd59def14156ebeef Mon Sep 17 00:00:00 2001 From: Robin Schneider <45321827+robinschneider@users.noreply.github.com> Date: Mon, 25 Oct 2021 14:08:31 +0200 Subject: [PATCH] Update src/components/services/OpenWeather.vue Co-authored-by: Bastien Wirtz --- src/components/services/OpenWeather.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/services/OpenWeather.vue b/src/components/services/OpenWeather.vue index 7352b9b..79d5e37 100644 --- a/src/components/services/OpenWeather.vue +++ b/src/components/services/OpenWeather.vue @@ -64,7 +64,8 @@ export default { locationQuery = `q=${this.item.location}`; } - const url = `https://api.openweathermap.org/data/2.5/weather?${locationQuery}&appid=${this.item.apikey}&units=${this.item.units}`; + const apiKey = this.item.apikey || this.item.apiKey; + const url = `https://api.openweathermap.org/data/2.5/weather?${locationQuery}&appid=${apiKey}&units=${this.item.units}`; fetch(url) .then((response) => { if (!response.ok) { -- 2.41.0