fix build errors
This commit is contained in:
parent
317b43016b
commit
2c3fe62059
2 changed files with 3 additions and 3 deletions
|
|
@ -79,13 +79,13 @@ export class SteamAPI extends APIModel {
|
||||||
|
|
||||||
debugLog(await fetchData.json);
|
debugLog(await fetchData.json);
|
||||||
|
|
||||||
let result;
|
let result: any;
|
||||||
for (const [key, value] of Object.entries(await fetchData.json)) {
|
for (const [key, value] of Object.entries(await fetchData.json)) {
|
||||||
// console.log(typeof key, key)
|
// console.log(typeof key, key)
|
||||||
// console.log(typeof id, id)
|
// console.log(typeof id, id)
|
||||||
// after some testing I found out that id is somehow a number despite that it's defined as string...
|
// after some testing I found out that id is somehow a number despite that it's defined as string...
|
||||||
if (key === String(id)) {
|
if (key === String(id)) {
|
||||||
result = value.data;
|
result = (value as any).data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ export class WikipediaAPI extends APIModel {
|
||||||
|
|
||||||
const data = await fetchData.json();
|
const data = await fetchData.json();
|
||||||
debugLog(data);
|
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({
|
const model = new WikiModel({
|
||||||
type: 'wiki',
|
type: 'wiki',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue