Skip to content

Commit

Permalink
fix(data): fix latestFilterVersion (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelB committed Jul 21, 2020
1 parent d958055 commit df9b5bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ async function fetchAllArticles(node, depth = 0) {

const pArticles = (node.articles || [])
.filter(({ etat }) => etat.startsWith("VIGUEUR"))
.filter(latestArticleVersionFilter)
.map(({ id }) =>
queue.add(() => {
log.info("fetch()", `Fetching ${id}…`);
Expand All @@ -76,7 +77,7 @@ async function fetchAllArticles(node, depth = 0) {
);

const sections = await Promise.all(pSections);
const articles = (await Promise.all(pArticles)).filter(latestArticleVersionFilter).map(toArticle);
const articles = (await Promise.all(pArticles)).map(toArticle);

return {
...toSection(node, depth),
Expand Down
2 changes: 1 addition & 1 deletion scripts/libs/transform.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const numify = id => parseInt(id.replace(/^KALIARTI/, ""));
const numify = id => parseInt(id.replace(/^LEGIARTI/, ""));

export const isValidSection = node => !node.etat || node.etat.startsWith("VIGUEUR");

Expand Down

0 comments on commit df9b5bc

Please sign in to comment.