From 2c3fe620590196a54c4509286885e34f42d01a1c Mon Sep 17 00:00:00 2001 From: mProjectsCode Date: Sat, 2 Jul 2022 13:19:59 +0200 Subject: [PATCH] fix build errors --- src/api/apis/SteamAPI.ts | 4 ++-- src/api/apis/WikipediaAPI.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/apis/SteamAPI.ts b/src/api/apis/SteamAPI.ts index ef8f21d..faeb7aa 100644 --- a/src/api/apis/SteamAPI.ts +++ b/src/api/apis/SteamAPI.ts @@ -79,13 +79,13 @@ export class SteamAPI extends APIModel { debugLog(await fetchData.json); - let result; + let result: any; for (const [key, value] of Object.entries(await fetchData.json)) { // console.log(typeof key, key) // console.log(typeof id, id) // after some testing I found out that id is somehow a number despite that it's defined as string... if (key === String(id)) { - result = value.data; + result = (value as any).data; } } if (!result) { diff --git a/src/api/apis/WikipediaAPI.ts b/src/api/apis/WikipediaAPI.ts index b0796b2..835e225 100644 --- a/src/api/apis/WikipediaAPI.ts +++ b/src/api/apis/WikipediaAPI.ts @@ -58,7 +58,7 @@ export class WikipediaAPI extends APIModel { const data = await fetchData.json(); debugLog(data); - const result = Object.entries(data?.query?.pages)[0][1]; + const result: any = Object.entries(data?.query?.pages)[0][1]; const model = new WikiModel({ type: 'wiki',