Skip to content

Commit

Permalink
fix(storefront): BCTHEME-1076 Unable to navigate to home page from se…
Browse files Browse the repository at this point in the history
…arch results page after clicking Back button on browser.
  • Loading branch information
“bc-yevhenii-buliuk” committed Jul 19, 2022
1 parent 56e5431 commit 2462179
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Draft
- Unable to navigate to home page from search results page after clicking Back button on browser. [#2238](https://github.com/bigcommerce/cornerstone/issues/2238)
- Bump webpack-bundle-analyzer [#2229]https://github.com/bigcommerce/cornerstone/pull/2229

## 6.5.0 (06-24-2022)
Expand Down
4 changes: 1 addition & 3 deletions assets/js/theme/global/quick-search.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import _ from 'lodash';
import utils from '@bigcommerce/stencil-utils';
import StencilDropDown from './stencil-dropdown';
import urlUtils from '../common/utils/url-utils';

export default function () {
const TOP_STYLING = 'top: 49px;';
Expand Down Expand Up @@ -88,7 +87,6 @@ export default function () {
return;
}

urlUtils.goToUrl(`${searchUrl}?search_query=${encodeURIComponent(searchQuery)}`);
window.location.reload();
window.location.href = `${searchUrl}?search_query=${encodeURIComponent(searchQuery)}`;
});
}

0 comments on commit 2462179

Please sign in to comment.