From 3aee480ccbad7d625d9d73a9d9895c8c209b0cd0 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Mon, 23 Aug 2021 21:24:46 +0200 Subject: [PATCH] Refactoring --- .../data-provider/yahoo-finance/yahoo-finance.service.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts b/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts index a3665db1d..418687b17 100644 --- a/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts +++ b/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts @@ -99,11 +99,9 @@ export class YahooFinanceService implements DataProviderInterface { value.summaryProfile?.country ) { try { - const [code] = Object.entries(countries).find( - ([, currentCountry]) => { - return currentCountry.name === value.summaryProfile?.country; - } - ); + const [code] = Object.entries(countries).find(([, country]) => { + return country.name === value.summaryProfile?.country; + }); if (code) { response[symbol].countries = [{ code, weight: 1 }];