Renamed conflictual variable

pull/73/head
MillenniumEarl 2021-03-03 21:17:37 +01:00
parent 0cb3cdb534
commit c5797b660b
1 changed files with 3 additions and 3 deletions

View File

@ -63,16 +63,16 @@ async function main() {
query.keywords = gamename; query.keywords = gamename;
// Fetch the first result // Fetch the first result
const result = await searchHandiwork<Game>(query, 1); const searchResult = await searchHandiwork<Game>(query, 1);
// No game found // No game found
if (result.length === 0) { if (searchResult.length === 0) {
console.log(`No data found for '${gamename}'`); console.log(`No data found for '${gamename}'`);
continue; continue;
} }
// Extract first game // Extract first game
const gamedata = result.shift(); const gamedata = searchResult.shift();
const authors = gamedata.authors.map((a, idx) => a.name).join(", "); const authors = gamedata.authors.map((a, idx) => a.name).join(", ");
console.log(`Found: ${gamedata.name} (${gamedata.version}) by ${authors}\n`); console.log(`Found: ${gamedata.name} (${gamedata.version}) by ${authors}\n`);
} }