Skip to content

Commit

Permalink
Merge e013012 into 1808d09
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz authored Aug 24, 2022
2 parents 1808d09 + e013012 commit 2213de6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/articles.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ function urlQuery2Filter({ userId, ...query } = {}) {
const selectedReplyTypes = ReplyTypeFilter.getValues(query);
if (selectedReplyTypes.length) filterObj.replyTypes = selectedReplyTypes;

// No UI for article types yet, so we read from `query` directly
const articleTypes = query.articleTypes ? query.articleTypes.split(',') : [];
if (articleTypes.length) filterObj.articleTypes = articleTypes;

// Return filterObj only when it is populated.
if (!Object.keys(filterObj).length) {
return undefined;
Expand Down

0 comments on commit 2213de6

Please sign in to comment.