From 747cbb5dde426276a0585ddd536089c843c00ab6 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 8 May 2021 07:54:46 -0700 Subject: [PATCH] integrations: Fix JavaScript exception on category pages. This logic threw an exception ever since we added new buttons at the bottom of the page that were inside the container this looped over. --- static/js/portico/integrations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/portico/integrations.js b/static/js/portico/integrations.js index ff0f7ddfd7..5a31131ed7 100644 --- a/static/js/portico/integrations.js +++ b/static/js/portico/integrations.js @@ -102,8 +102,8 @@ function update_categories() { const update_integrations = _.debounce(() => { const max_scrollY = window.scrollY; - for (const integration of $(".integration-lozenges").children()) { - const $integration = $(integration).find(".integration-lozenge"); + for (const integration of $(".integration-lozenges").find(".integration-lozenge")) { + const $integration = $(integration); const $integration_category = $integration.find(".integration-category"); if (state.category !== "all") {