Skip to content

Commit

Permalink
Fix to match correct data structure
Browse files Browse the repository at this point in the history
  • Loading branch information
iadawn committed Dec 14, 2023
1 parent 09819c3 commit 4b30e63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _includes/wai-evaluation-tools-list/js/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const filterForm = document.querySelector('[data-filter-form]');
const sortForm = document.querySelector('.sort-by');
const searchForm = document.querySelector('#search');

const importJson = String.raw`{{ site.data.wai-evaluation-tools-list.tools | jsonify }}`;
const importJson = String.raw`{{ site.data.wai-evaluation-tools-list.submissions | jsonify }}`;
importJson.replace("\\","\\\\");

const jsonTools = JSON.parse(importJson);
Expand Down Expand Up @@ -295,7 +295,7 @@ if (filterForm && sortForm && search) {

sortedArticles.forEach(el => {
// if (!Object.values(newResults).find(o => o.title === el.getElementsByTagName("h3")[0].innerHTML && o.creator === el.querySelector('.leftColHeader').innerHTML.replace("by ", ""))){
if (!Object.values(newResults).find(o => o.title.replace(/\s+/g, '-').toLowerCase() === el.id && o.creator === el.querySelector('.leftColHeader').innerHTML.replace("by ", ""))){
if (!Object.values(newResults).find(o => o.title.replace(/\s+/g, '-').toLowerCase() === el.id && o.provider === el.querySelector('.leftColHeader').innerHTML.replace("by ", ""))){
el.hidden = true;
el.classList.add("inactive");
}
Expand Down

0 comments on commit 4b30e63

Please sign in to comment.