Skip to content

Commit

Permalink
Autopush env bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmechali committed Oct 31, 2024
1 parent d003bff commit 10ab9d2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ const NlSearchBarHeaderInline = ({
}: NlSearchBarImplementationProps): ReactElement => {
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;
const enableAutoComplete = isAutopushEnv
? true
: urlParams.has("ac_on") && urlParams.get("ac_on") == "true";

return (
<div className="header-search-section">
Expand Down

0 comments on commit 10ab9d2

Please sign in to comment.