fix next prev ids
This commit is contained in:
parent
cd65934c8a
commit
9ff5506607
4
main.ts
4
main.ts
@ -179,8 +179,8 @@ const articlesIdMax = 87;
|
||||
|
||||
const articles: ArticleInfo[] = [];
|
||||
for (let id = articlesIdMin; id <= articlesIdMax; ++id) {
|
||||
const prevId = id > articlesIdMin ? id : undefined;
|
||||
const nextId = id < articlesIdMax ? id : undefined;
|
||||
const prevId = id > articlesIdMin ? id - 1 : undefined;
|
||||
const nextId = id < articlesIdMax ? id + 2 : undefined;
|
||||
|
||||
console.log(`Downloading article ${id}...`);
|
||||
const article = await downloadArticle(id);
|
||||
|
Loading…
Reference in New Issue
Block a user