mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Merge pull request #353 from sharetribe/bug-window-in-server-rendering
Bug fix: window was exposed to server rendering
This commit is contained in:
commit
20f5c152ed
1 changed files with 4 additions and 1 deletions
|
|
@ -209,7 +209,10 @@ export class SearchPageComponent extends Component {
|
|||
/>
|
||||
);
|
||||
const showSearchMapInMobile = this.state.isSearchMapOpenOnMobile ? searchMap : null;
|
||||
const searchMapMaybe = window.innerWidth < MODAL_BREAKPOINT ? showSearchMapInMobile : searchMap;
|
||||
const isWindowDefined = typeof window !== 'undefined';
|
||||
const searchMapMaybe = isWindowDefined && window.innerWidth < MODAL_BREAKPOINT
|
||||
? showSearchMapInMobile
|
||||
: searchMap;
|
||||
|
||||
const searchParamsForPagination = parse(location.search);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue