From 21ef43c57bea4265a53b1cecd4014b12fb2091ae Mon Sep 17 00:00:00 2001 From: Gabriel Mechali Date: Thu, 31 Oct 2024 17:27:58 -0400 Subject: [PATCH] Autopush env bug fix. (#4696) --- .../components/nl_search_bar/nl_search_bar_header_inline.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/static/js/components/nl_search_bar/nl_search_bar_header_inline.tsx b/static/js/components/nl_search_bar/nl_search_bar_header_inline.tsx index 6aed4822e3..7714cb4bf5 100644 --- a/static/js/components/nl_search_bar/nl_search_bar_header_inline.tsx +++ b/static/js/components/nl_search_bar/nl_search_bar_header_inline.tsx @@ -35,9 +35,8 @@ const NlSearchBarHeaderInline = ({ const urlParams = new URLSearchParams(window.location.search); const isAutopushEnv = window.location.hostname == "autopush.datacommons.org"; const enableAutoComplete = - isAutopushEnv || urlParams.has("ac_on") - ? urlParams.get("ac_on") == "true" - : false; + isAutopushEnv || + (urlParams.has("ac_on") && urlParams.get("ac_on") == "true"); return (