Skip to content

Commit

Permalink
Fixes bug with disappering product links
Browse files Browse the repository at this point in the history
Co-authored-by: curt-mitch-census <[email protected]>
  • Loading branch information
sadiejay and curt-mitch-census committed Jul 12, 2024
1 parent b7f582b commit b3da581
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/filter-cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ Array.from(cards).forEach((card) => {
card.getElementsByClassName("product-desc")[0].innerText;

const href = card.getElementsByClassName("product-link")[0].innerText;
if (href.trim() !== 'no-link') {
if (href.trim() !== "no-link") {
// reset display if user previously clicked a no-link card
modal.getElementsByClassName("modal-link")[0].style.display = "";
modal.getElementsByClassName("modal-link")[0].href = href;
} else {
modal.getElementsByClassName("modal-link")[0].style.display = "none";
Expand Down

0 comments on commit b3da581

Please sign in to comment.