From b6e57e8a19466b95ff5fe2c1f87ea28641490655 Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Fri, 6 Jan 2023 16:18:33 -0600 Subject: [PATCH] reduse use of .reduce --- server/scripts/modules/travelforecast.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/scripts/modules/travelforecast.mjs b/server/scripts/modules/travelforecast.mjs index e0ea914..a5a8144 100644 --- a/server/scripts/modules/travelforecast.mjs +++ b/server/scripts/modules/travelforecast.mjs @@ -57,7 +57,7 @@ class TravelForecast extends WeatherDisplay { this.data = forecasts; // test for some data available in at least one forecast - const hasData = this.data.reduce((acc, forecast) => acc || forecast.high, false); + const hasData = this.data.some((forecast) => forecast.high); if (!hasData) { this.setStatus(STATUS.noData); return;