From 67e213ee17e207ca1db397cf0237f16b666f9329 Mon Sep 17 00:00:00 2001 From: kewitham Date: Fri, 2 Aug 2024 14:11:42 -0500 Subject: [PATCH] fix in page search on ada page: --- assets/js/expand-sidenav.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/expand-sidenav.js b/assets/js/expand-sidenav.js index b4b69eda4..45b7cc305 100644 --- a/assets/js/expand-sidenav.js +++ b/assets/js/expand-sidenav.js @@ -3,7 +3,7 @@ const sidenav = () => { if (!sideNav) return; const expandButton = document.getElementById('expand-all'); const expandText = document.querySelector('.expand-text'); - const expandIcon = expandButton.querySelector('.usa-icon'); + const expandIcon = expandButton?.querySelector('.usa-icon'); const nav = document.querySelector('.usa-accordion.margin-bottom-2'); function expandAll() { const submenuButtons = document.getElementsByClassName('usa-accordion__button');