diff --git a/CHANGELOG.md b/CHANGELOG.md index d6a7d7c7..616fa4af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- ### Article List: Fixes Exclusion Filters + ### Article List + Fixes a bug with the `Article List` introduced when we refactored Article Lists to strictly enforce chronological order despite API timings. The bug would cause exclusions to throw an API Error instead of skipping processing entirely, which they had done when chronological order was not strictly enforced. + + This has been corrected and Articles flagged with Excluded Categories / Excluded Tags are properly removed with an additional check. + + Resolves #1207 +--- + - ### New Image Styles: Colorbox Image Styles ### New Image Styles Adds 4 new colorbox image styles: `Colorbox Small` , `Colorbox Small Square`, `Colorbox Small Thumbnail`, `Colorbox Square`. On click, these open up a modal with the full image and caption. diff --git a/js/ucb-article-list.js b/js/ucb-article-list.js index 478f7632..2406055f 100644 --- a/js/ucb-article-list.js +++ b/js/ucb-article-list.js @@ -212,7 +212,9 @@ let results = await Promise.all(promises); - results.forEach(result => { + results + .filter(result => result !== undefined) + .forEach(result => { let dataOutput = document.getElementById("ucb-al-data"); let thisArticle = document.createElement("article"); thisArticle.className = 'ucb-article-card-container'; @@ -220,6 +222,7 @@ dataOutput.append(thisArticle); }); + if (NEXTJSONURL) { toggleMessage('ucb-el-load-more', 'inline-block'); }