Fixing comments

pull/59/head
MillenniumEarl 2020-12-15 14:02:41 +01:00
parent ee34665b3a
commit f0caf0f669
1 changed files with 6 additions and 4 deletions

View File

@ -43,10 +43,11 @@ module.exports.fetchLatest = async function(query, limit = 30) {
// Save the URLs
for(const result of response.data.msg.data) {
if(fetchedResults >= limit) continue;
const gameURL = new URL(result.thread_id, threadURL).href;
resultURLs.push(gameURL);
fetchedResults += 1;
if(fetchedResults < limit) {
const gameURL = new URL(result.thread_id, threadURL).href;
resultURLs.push(gameURL);
fetchedResults += 1;
}
}
// Increment page and check for it's existence
@ -93,6 +94,7 @@ function parseLatestURL(query, page = 1) {
url.searchParams.append("tags[]", tag);
}
}
if (query.prefixes) {
for (const p of query.prefixes) {
url.searchParams.append("prefixes[]", p);