From 5bf313924ae0fc7cb12c4fffbb3b1e58ec54983a Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Wed, 24 Aug 2022 20:00:10 +0200 Subject: [PATCH] fix: weather bug --- src/components/widgets/weather/Weather.jsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/widgets/weather/Weather.jsx b/src/components/widgets/weather/Weather.jsx index 0bef37a0..b6c03085 100644 --- a/src/components/widgets/weather/Weather.jsx +++ b/src/components/widgets/weather/Weather.jsx @@ -149,7 +149,7 @@ export default class Weather extends PureComponent { render() { const weatherType = localStorage.getItem('weatherType'); const enabled = (setting) => { - return (localStorage.getItem(setting) === 'true' && weatherType >= 3) || weatherType == 3; + return (localStorage.getItem(setting) === 'true' && weatherType >= 3) || weatherType === "3"; }; if ( @@ -199,7 +199,7 @@ export default class Weather extends PureComponent { )} )} - {enabled('cloudiness') || weatherType === 3 ? ( + {enabled('cloudiness') ? ( ) : null} - {enabled('windspeed') || weatherType === 3 ? ( + {enabled('windspeed') ? ( ) : null} - {enabled('atmosphericpressure') || weatherType === 3 ? ( + {enabled('atmosphericpressure') ? ( ) : null} - {enabled('weatherdescription') || weatherType === 3 ? ( + {enabled('weatherdescription') ? ( ) : null} - {enabled('visibility') || weatherType === 3 ? ( + {enabled('visibility') ? ( )} - {weatherType === 3 ? expandedInfo() : null} + {weatherType >= 3 ? expandedInfo() : null} ); }